EXPLAIN EXECUTE doesn't support coordinator INSERT/SELECT with parametrized SELECT.
Open
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
```sql
CREATE TABLE simple (id integer, name text);
SELECT create_distributed_table('simple', 'id');
PREPARE insert_via_coordinator AS INSERT INTO simple SELECT count(*), name FROM simple WHERE name IN ($1, $2) GROUP BY name;
EXPLAIN EXECUTE insert_via_coordinator('x', 'y');
```
produces the following error:
```
ERROR: could not create distributed plan
DETAIL: Possibly this is caused by the use of parameters in SQL functions, which is not supported in Citus.
HINT: Consider using PL/pgSQL functions instead.
```
Contributor guide
Assessment
This issue has not been assessed yet.