%I doesn't work with run_command_on_shards
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
Steps to reproduce:
```
create table test_table (col1 int, col2 int);
select create_distributed_table('test_table' , 'col1');
select run_command_on_shards('test_table', 'update %I set col1 = 1 where col2 = 2');
```
```
run_command_on_shards
---------------------------------------------------------------------------
(102724,f,"ERROR: relation ""public.test_table_102724"" does not exist")
(102725,f,"ERROR: relation ""public.test_table_102725"" does not exist")
(102726,f,"ERROR: relation ""public.test_table_102726"" does not exist")
(102727,f,"ERROR: relation ""public.test_table_102727"" does not exist")
(102728,f,"ERROR: relation ""public.test_table_102728"" does not exist")
(102729,f,"ERROR: relation ""public.test_table_102729"" does not exist")
(102730,f,"ERROR: relation ""public.test_table_102730"" does not exist")
(102731,f,"ERROR: relation ""public.test_table_102731"" does not exist")
(102732,f,"ERROR: relation ""public.test_table_102732"" does not exist")
(102733,f,"ERROR: relation ""public.test_table_102733"" does not exist")
(102734,f,"ERROR: relation ""public.test_table_102734"" does not exist")
(102735,f,"ERROR: relation ""public.test_table_102735"" does not exist")
(102736,f,"ERROR: relation ""public.test_table_102736"" does not exist")
(102737,f,"ERROR: relation ""public.test_table_102737"" does not exist")
(102738,f,"ERROR: relation ""public.test_table_102738"" does not exist")
(102739,f,"ERROR: relation ""public.test_table_102739"" does not exist")
(102740,f,"ERROR: relation ""public.test_table_102740"" does not exist")
(102741,f,"ERROR: relation ""public.test_table_102741"" does not exist")
(102742,f,"ERROR: relation ""public.test_table_102742"" does not exist")
(102743,f,"ERROR: relation ""public.test_table_102743"" does not exist")
(102744,f,"ERROR: relation ""public.test_table_102744"" does not exist")
(102745,f,"ERROR: relation ""public.test_table_102745"" does not exist")
(102746,f,"ERROR: relation ""public.test_table_102746"" does not exist")
(102747,f,"ERROR: relation ""public.test_table_102747"" does not exist")
(102748,f,"ERROR: relation ""public.test_table_102748"" does not exist")
(102749,f,"ERROR: relation ""public.test_table_102749"" does not exist")
(102750,f,"ERROR: relation ""public.test_table_102750"" does not exist")
(102751,f,"ERROR: relation ""public.test_table_102751"" does not exist")
(102752,f,"ERROR: relation ""public.test_table_102752"" does not exist")
(102753,f,"ERROR: relation ""public.test_table_102753"" does not exist")
(102754,f,"ERROR: relation ""public.test_table_102754"" does not exist")
(102755,f,"ERROR: relation ""public.test_table_102755"" does not exist")
(32 rows)
```
This used to work with previous Citus releases. I think the issue is that we're adding an extra quote to the tablename. Probably introduced in https://github.com/citusdata/citus/pull/1266 . Most scripts I've shared with customers have %I in them, so I think we should fix this soon.
Contributor guide
Assessment
This issue has not been assessed yet.