Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0
Дата
Msg-id 5538E9E3.3020202@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0  (Geoff Winkless <pgsqladmin@geoff.dj>)
Список 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 по дате отправления:

Предыдущее
От: Geoff Winkless
Дата:
Сообщение: Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0
Следующее
От: Andres Freund
Дата:
Сообщение: Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0