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