Skip to content

Catch invalid ON CONFLICT DO UPDATE column references#4366

Open
nikolayk812 wants to merge 7 commits intosqlc-dev:mainfrom
nikolayk812:4291-on-conflict
Open

Catch invalid ON CONFLICT DO UPDATE column references#4366
nikolayk812 wants to merge 7 commits intosqlc-dev:mainfrom
nikolayk812:4291-on-conflict

Conversation

@nikolayk812
Copy link
Copy Markdown

@nikolayk812 nikolayk812 commented Apr 1, 2026

  • Validate ON CONFLICT (col) conflict target columns exist
  • Validate DO UPDATE SET col = ... assignment target columns exist
  • Validate EXCLUDED.col references exist
  • Catch missing conflict target for DO UPDATE (requires ON CONFLICT (col) or ON CONSTRAINT name)

Fixes #4291

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Column names in ON CONFLICT DO UPDATE SET clause not validated

1 participant