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

From Petr Jelinek
Subject Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0
Date
Msg-id 5538E9E3.3020202@2ndquadrant.com
Whole thread Raw
In response to Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0  (Geoff Winkless <pgsqladmin@geoff.dj>)
List pgsql-hackers
On 23/04/15 14:34, Geoff Winkless wrote:
> Apologies for butting in but can I (as a user) express a preference as a
> user against DO?
>
> Firstly, it looks horrible. And what's to stop me having "SELECT true AS
> do" in the where clause (as per your UPDATE objection)?
>

DO is already reserved keyword. There is also some precedence for this 
in CREATE RULE. But I agree that it's not ideal syntax.

> Shouldn't UPDATE be a reserved keyword anyway? AIUI ANSI suggests so.
>
> http://developer.mimer.se/validator/sql-reserved-words.tml
>
> I had always assumed it was; anyone who produced a query for me that
> contained update in an unusual context would get slapped heavily.

Postgres currently has UPDATE as unreserved keyword and more importantly 
IGNORE is not keyword at all so making it a new reserved keyword is not 
nice at all.

--  Petr Jelinek                  http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Geoff Winkless
Date:
Subject: Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0
Next
From: Andres Freund
Date:
Subject: Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0