Re: parameters in functions and overlap with names of columns

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: parameters in functions and overlap with names of columns
Дата
Msg-id 23231.1249398023@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: parameters in functions and overlap with names of columns  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Список pgsql-general
Ivan Sergio Borgonovo <mail@webthatworks.it> writes:
> Pavel Stehule <pavel.stehule@gmail.com> wrote:
>> yes - the most common is an using of prefix '_' for local plpgsql
>> variables. Other possibility is using qualified names.

> Just to be sure... by qualified names you mean schema qualified name
> or table qualified names in case of columns... right...

Right.  The plpgsql parser is (just barely) smart enough to not try
to substitute a local variable name for the second part of a qualified
name "a.b".  So you could write "tab.col1" in your queries.

            regards, tom lane

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: parameters in functions and overlap with names of columns
Следующее
От: Alban Hertroys
Дата:
Сообщение: Re: character 0xe29986 of encoding "UTF8" has no equivalent in "LATIN2"