News for hackers. Stuff that matters.
Re:Upsert in SQL by keosak on Monday September 25, 2023 @01:50PM (#37647845)
INSERT ... ON CONFLICT has a problem with CHECK constraints. The constraint must be satisfied in the INSERT tuple even if the row already exists and UPDATE will be executed. I recently dealt with this at work and the resulting CTE query was very similar to MERGE, except MERGE has better syntax.

There are no comments on this comment yet.