Re: open and close columns in the NEW record not allowed

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: open and close columns in the NEW record not allowed
Дата
Msg-id 5658.1391700010@sss.pgh.pa.us
обсуждение исходный текст
Ответ на open and close columns in the NEW record not allowed  (Rafael Martinez Guerrero <r.m.guerrero@usit.uio.no>)
Список 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 по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: open and close columns in the NEW record not allowed
Следующее
От: Andres Freund
Дата:
Сообщение: Re: updated emacs configuration