Re: INSERT ... ON CONFLICT syntax issues - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: INSERT ... ON CONFLICT syntax issues
Date
Msg-id 553E99C0.10704@gmx.net
Whole thread Raw
In response to Re: INSERT ... ON CONFLICT syntax issues  (Peter Geoghegan <pg@heroku.com>)
Responses Re: INSERT ... ON CONFLICT syntax issues
List pgsql-hackers
On 4/25/15 2:05 PM, Peter Geoghegan wrote:
> Note that the syntax is quite similar to the SQLite
> syntax of the same feature, that has ON CONFLICT IGNORE (it also has
> ON CONFLICT REPLACE, but not ON CONFLICT UPDATE).

I don't know anything about SQLite's syntax, but from the online syntax
diagrams

https://www.sqlite.org/lang_insert.html
https://www.sqlite.org/syntax/conflict-clause.html

it appears that they are using quite a different syntax.  The ON
CONFLICT clause is attached to a constraint, specifying the default
action for that constraint.  The INSERT command can then override this
default choice.  I think.




pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: Proposal: knowing detail of config files via SQL
Next
From: Jim Nasby
Date:
Subject: Re: Temporal extensions