citusdata / citusdata/citus

INSERT..SELECT allows subqueries in returning to pass through

Open
#3,395 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.