Re: unfathomable comment in psqlscan.l

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: unfathomable comment in psqlscan.l
Дата
Msg-id 603c8f071001261122i7971cb16kd62e96dbbb4854dd@mail.gmail.com
обсуждение исходный текст
Ответ на Re: unfathomable comment in psqlscan.l  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, Jan 26, 2010 at 2:12 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> While reviewing Pavel's patch for variable quoting in psql, I came
>> upon the following comment in psqlscan.l:
>
>>         /*
>>          * The variable value is just emitted without any
>>          * further examination.  This is consistent with the
>>          * pre-8.0 code behavior, if not with the way that
>>          * variables are handled outside backslash commands.
>>          */
>
>> I cannot figure out for the life of me what this is referring to.
>
> At the other place where :foo is expanded, the value is pushed for
> re-scanning; thus for example ":bar" within the variable value
> might be further expanded as a reference to some other variable.
> Inside backslash commands we don't do that but just take the value
> literally.

Ah, makes sense.  Thanks.

...Robert


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Dividing progress/debug information in pg_standby, and stat before copy
Следующее
От: Boszormenyi Zoltan
Дата:
Сообщение: Re: ECPGset_var