Re: plpgsql keywords are hidden reserved words

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: plpgsql keywords are hidden reserved words
Дата
Msg-id 23353.1194286039@sss.pgh.pa.us
обсуждение исходный текст
Ответ на plpgsql keywords are hidden reserved words  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
John DeSoi <desoi@pgedit.com> writes:
> Is there any feasibility to the idea of allowing pl/pgsql variables  
> and parameters to be prefixed with a special character like '$'?

I find this (a) really ugly, (b) incompatible with Oracle, which
you'll recall is one of the main driving ideas for plpgsql, and
(c) almost certainly a lexical conflict with dollar quoting.

Most other special characters you might suggest would create
parsing ambiguities too.

> I'm constantly adding prefixes like 'v_' because of conflicts with table  
> or column names.

The reason you have to do that is that we got the lookup order backward:
per Oracle, column names within a query should bind more tightly than
plpgsql variable names, and if you need to disambiguate you qualify
the variables.  We should fix that instead of bogotifying the syntax.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: plpgsql keywords are hidden reserved words
Следующее
От: Zdenek Kotala
Дата:
Сообщение: Is necessary to use SEQ_MAXVALUE in pg_dump?