Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0 - Mailing list pgsql-hackers

From Andres Freund
Subject Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0
Date
Msg-id 607ECA03-9790-4BC6-8476-4CDB188AE0AB@anarazel.de
Whole thread Raw
In response to Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0  (Geoff Winkless <pgsqladmin@geoff.dj>)
Responses Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0
List pgsql-hackers
On April 23, 2015 3:34:07 PM GMT+03:00, Geoff Winkless <pgsqladmin@geoff.dj> wrote:
>Apologies for butting in but can I (as a user) express a preference as
>a
>user against DO?

Sure. If you propose an alternative ;)

>Firstly, it looks horrible. And what's to stop me having "SELECT true
>AS
>do" in the where clause (as per your UPDATE objection)?

A syntax error. DO is a reserved keyword. Update is just unreserved (and thus can be used as a column label). Ignore is
unreservedwith the patch and was unreserved before.  We obviously can make both reserved, but of so we have to do it
forreal, not by hiding the conflicts 
 

>Shouldn't UPDATE be a reserved keyword anyway? AIUI ANSI suggests so.
>
>http://developer.mimer.se/validator/sql-reserved-words.tml

It's not one right now. And ignore isn't a keyword at all atm.

(Please don't top post)

Andres


--- 
Please excuse brevity and formatting - I am writing this on my mobile phone.



pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0
Next
From: Robert Haas
Date:
Subject: Re: tablespaces inside $PGDATA considered harmful