-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: support expressions as ON CONFLICT targets #67893
Copy link
Copy link
Open
cockroachdb/activerecord-cockroachdb-adapter
#250Labels
A-sql-optimizerSQL logical planning and optimizations.SQL logical planning and optimizations.A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLA-sql-syntaxIssues strictly related to the SQL grammar, with no semantic aspectIssues strictly related to the SQL grammar, with no semantic aspectA-tools-hasuraC-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 Teamdocs-donedocs-known-limitation
Metadata
Metadata
Assignees
Labels
A-sql-optimizerSQL logical planning and optimizations.SQL logical planning and optimizations.A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLA-sql-syntaxIssues strictly related to the SQL grammar, with no semantic aspectIssues strictly related to the SQL grammar, with no semantic aspectA-tools-hasuraC-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 Teamdocs-donedocs-known-limitation
Type
Projects
Status
Backlog
We don't currently support expressions as
ON CONFLICTtargets. This means that unique expression indexes (still a WIP at the time this was written) cannot be selected as arbiters forINSERT .. ON CONFLICTstatements. This will require adding support for expressionON CONFLICTtargets to the parser and the AST, and updating optbuilder's arbiter logic to select arbiters based on the expression.Example:
Jira issue: CRDB-8765