Re: [HACKERS] Undefined psql variables

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: [HACKERS] Undefined psql variables
Дата
Msg-id alpine.DEB.2.20.1701231908220.31421@lancre
обсуждение исходный текст
Ответ на Re: [HACKERS] Undefined psql variables  (Corey Huinker <corey.huinker@gmail.com>)
Ответы Re: [HACKERS] Undefined psql variables  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список 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.



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: [HACKERS] Allowing nonzero return codes from \quit
Следующее
От: Kevin Grittner
Дата:
Сообщение: Re: [HACKERS] [PATCH] Add GUCs for predicate lock promotion thresholds