-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: support INSERT ... ON CONFLICT ON CONSTRAINT #28161
Copy link
Copy link
Closed
Labels
A-sql-mutationsMutation statements: UPDATE/INSERT/UPSERT/DELETE.Mutation statements: UPDATE/INSERT/UPSERT/DELETE.A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-queriesSQL Queries TeamSQL Queries TeamX-anchored-telemetryThe issue number is anchored by telemetry references.The issue number is anchored by telemetry references.
Metadata
Metadata
Assignees
Labels
A-sql-mutationsMutation statements: UPDATE/INSERT/UPSERT/DELETE.Mutation statements: UPDATE/INSERT/UPSERT/DELETE.A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-queriesSQL Queries TeamSQL Queries TeamX-anchored-telemetryThe issue number is anchored by telemetry references.The issue number is anchored by telemetry references.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
Done
Postgres supports an extension of
INSERT ... ON CONFLICTwhere a constraint name is given instead of a set of columns.We currently don't support this, but we should:
cockroach/pkg/sql/parser/sql.y
Line 4808 in 07d85bd
This would have been a solution for #27981 if we supported it.
cc. @knz for triage. Perhaps @emsal1863 would be interested in working on this?