Re: proposal - assign result of query to psql variable

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Phil Sorber <phil(at)omniti(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal - assign result of query to psql variable
Date: 2013-02-03 19:02:27
Message-ID: 11009.1359918147@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> now missing variables is replaced by variable's name. We can implement
> some pset option - some like define what do with missing variable

> \pset missing_variable (use_name | use_null | error )

No, it isn't "replaced by variable's name". What actually happens is we
don't attempt a replacement unless the string after the colon matches an
existing variable. Tampering with that seems dangerous and foolish.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2013-02-03 19:34:24 Re: proposal - assign result of query to psql variable
Previous Message Tom Lane 2013-02-03 18:26:25 Re: autovacuum not prioritising for-wraparound tables