Re: unfathomable comment in psqlscan.l

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: unfathomable comment in psqlscan.l
Date: 2010-01-26 19:12:50
Message-ID: 17356.1264533170@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-01-26 19:19:33 Re: Dividing progress/debug information in pg_standby, and stat before copy
Previous Message Fujii Masao 2010-01-26 19:02:53 Re: testing cvs HEAD - HS/SR - missing file