Re: open and close columns in the NEW record not allowed - Mailing list pgsql-hackers

From Tom Lane
Subject Re: open and close columns in the NEW record not allowed
Date
Msg-id 5658.1391700010@sss.pgh.pa.us
Whole thread Raw
In response to open and close columns in the NEW record not allowed  (Rafael Martinez Guerrero <r.m.guerrero@usit.uio.no>)
List pgsql-hackers
Rafael Martinez Guerrero <r.m.guerrero@usit.uio.no> writes:
> The problem is that pl/pgsql does not accept open and close as column
> names when used in the NEW record in a trigger function.

Yup.  Those words (and other words that can start a plpgsql statement)
are reserved so far as plpgsql is concerned.

> This page:
> http://www.postgresql.org/docs/9.3/static/sql-keywords-appendix.html
> does not say that they are reserved words in postgresql (although they
> are reserved words in the sql standard)

It is not the business of that page to document the behavior of plpgsql.
Perhaps the plpgsql chapter should document what it considers to be
reserved words, but for now, you could look at the list in

http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=src/pl/plpgsql/src/pl_scanner.c

> We think the behavior should be consistent, either it is allow to use
> them or not, but not like it is today.

That would require giving plpgsql a privileged position over all other
PLs, which isn't going to happen ...
        regards, tom lane



pgsql-hackers by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: open and close columns in the NEW record not allowed
Next
From: Andres Freund
Date:
Subject: Re: updated emacs configuration