Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Feel free (or encouraged) to change the old behavior. (Of course, the
> new behavior needs to adjustments, too.) Generally, I think a variable
> should just stand for a data value and should not result in a slash
> command being generated.
That seems workable for :foo references in the body of a backslash
command --- you can just substitute the value but not allow it to be
split into multiple argument tokens. However, wouldn't you still want
to rescan it for internal :bar references to other variables? The psql
man page has some arm-waving about how you can do indirection, and seems
like that ought to work in this context too.
Also, this seems inconsistent with the non-backslash-command case.
Seems like you have to scan what goes into the query buffer to keep the
lexer state in sync, you can't just treat it as an uninterpreted token.
So not triggering on backslashes seems inconsistent.
We can certainly implement different behavior for the two cases, I'm
just unconvinced we should...
regards, tom lane
In response to
pgsql-patches by date
|Next:||From: Tom Lane||Date: 2004-02-18 18:06:27|
|Subject: Re: NO WAIT ... |
|Previous:||From: Peter Eisentraut||Date: 2004-02-18 17:33:59|
|Subject: Re: Doing psql's lexing with flex|