INSERT..SELECT allows subqueries in returning to pass through
Open
bug
warm-up
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
In INSERT..SELECT the planner allows subqueries in RETURNING to pass through and fail on the worker.
```
postgres=# INSERT INTO test (y, x) SELECT * FROM test ON CONFLICT DO NOTHING RETURNING (SELECT max(x) FROM test LIMIT 1);
ERROR: relation "public.test" does not exist
CONTEXT: while executing command on localhost:9701
```
Contributor guide
Assessment
This issue has not been assessed yet.