| From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
|---|---|
| To: | Corey Huinker <corey(dot)huinker(at)gmail(dot)com> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Undefined psql variables |
| Date: | 2017-01-23 18:16:57 |
| Message-ID: | alpine.DEB.2.20.1701231908220.31421@lancre |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
>> [...] Obviously the \if stuff is things we don't have yet either, but
>> it seems less likely to have surprising side-effects.
I agree, a more generic solution seems better than an ad-hoc one.
Currently the value of a non existing psql-variable is... its own
reference:-(
psql> \echo :x
> :x
I'm not sure of the rational, apart from the probable lexer implementation
point of view. Maybe an empty string or 0 or some configurable value would
provide better alternative.
> PGSERVICE=foo psql -f script.sql --set var1=a --set var2=b --set var3=d ...
> --set varN=n
How are the variable typically used in the script?
--
Fabien.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kevin Grittner | 2017-01-23 18:26:32 | Re: [PATCH] Add GUCs for predicate lock promotion thresholds |
| Previous Message | Pavel Stehule | 2017-01-23 18:15:47 | Re: Allowing nonzero return codes from \quit |