Re: Undefined psql variables

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: Undefined psql variables
Дата
Msg-id alpine.DEB.2.20.1704022221390.9265@lancre
обсуждение исходный текст
Ответ на Re: Undefined psql variables  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hello,

>> For checking variable definition, I would suggest to extend the variable
>> access syntax so that there is no exception to the one thing rule between
>> client side and server side evaluation:
>
>>    \if :?variable
>
> Don't like that one bit;

Possibly:-)

This is kind of a shell-like hack ${VAR:?error-message-if-not-defined},
or ${#VAR} to get a length.

They are not likable but they do the job.

> you're going to run out of namespace there in no time.

I do not undestand where there would be a namespace issue. Is that under 
the assumption that ":?xxx" is frequently used in SQL?

> And you don't have a very good way to say "if not defined", either.

Indeed. I'm afraid that handling "NOT" client-side would be necessary with 
this approach, so the decision would be 1 thing or 2 things where the 
first one is "NOT" would be handled client-side.

-- 
Fabien.



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

Предыдущее
От: Jan Michálek
Дата:
Сообщение: Re: Other formats in pset like markdown, rst, mediawiki
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: Undefined psql variables