Re: Doc patch--clarifying $1 in PL/PgSQL

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Doc patch--clarifying $1 in PL/PgSQL
Дата
Msg-id 12561.1072243303@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Doc patch--clarifying $1 in PL/PgSQL  (Jan Wieck <JanWieck@Yahoo.com>)
Ответы Re: Doc patch--clarifying $1 in PL/PgSQL
Список pgsql-patches
Jan Wieck <JanWieck@Yahoo.com> writes:
> Tom Lane wrote:
>> Not that hard ... just requires replacing some special-purpose code with
>> general-purpose code ...

> Does that code cause the variables value to change from function call to
> function call (what most users would expect if they give it a default
> value based on a call argument), or will remember the value from the
> first function call for the lifetime of the backend?

I believe it will evaluate the DEFAULT expression on each entry to the
block, using the current values of outer-block variables (and also
variables declared earlier in the same block, if anyone cared to use
that behavior).  The code was already designed and documented to
evaluate DEFAULT expressions on each block entry --- what it was missing
was the ability to reference variables in these expressions.

Do you see something wrong with it?

            regards, tom lane

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

Предыдущее
От: Jan Wieck
Дата:
Сообщение: Re: Doc patch--clarifying $1 in PL/PgSQL
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: CATALOG/NOCATALOG for new users