Unless conflict does not work on two-field indexes?
See original GitHub issueI get this error with UNLESS CONFLICT ON (.field1, .field)
:
edgedb.errors.QueryError: ON CONFLICT argument must be a property
And this error on UNLESS CONFLICT ON .field1, .field2
:
edgedb.errors.EdgeQLSyntaxError: Unexpected ','
I.e. it look like not a bug, but just syntactically incorrect
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Why PostgreSQL's ON CONFLICT Cannot Find My Partial ...
If the index used in ON CONFLICT() is a partial index, predicates of the index (WHERE …) must be added after the ON...
Read more >postgresql - Use multiple conflict_target in ON CONFLICT clause
ON CONFLICT requires a unique index* to do the conflict detection. So you just need to create a unique index on both columns:...
Read more >ON CONFLICT on two columns where one can be null
I'm trying to use ON CONFLICT on two columns where one can be null . Unfortunatelly with partial index I don't seem to...
Read more >Dropping index due to conflict with - how to solve related issues
This automatic process may have disadvantages, such as mapping conflicts, duplicate data and incorrect data types being set in the index. If the...
Read more >UPSERT ON CONFLICT enhancement - SQLite Forum
Sometimes the "indexed-column" list in UNIQUE constraints can be ... run into a differentation problem if there where multiple columns in ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Mulugruntz, this is currently set for the 1.0 milestone, but chances are we can get support for matching constraints with expressions in
UNLESS CONFLICT
into the next beta.Oh, I had meant to update this: we don’t yet support a direct syntax for this, but there is a simple workaround: use a computed property.
So with a schema like
You can do queries like