Re: [HACKERS] PSQL commands: \quit_if, \quit_unless

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: [HACKERS] PSQL commands: \quit_if, \quit_unless
Дата
Msg-id CAFj8pRBOWTvAGBar=uVvcu75b5eZA9TUJifFfCgGNfZhzErvZQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] PSQL commands: \quit_if, \quit_unless  (Corey Huinker <corey.huinker@gmail.com>)
Ответы Re: [HACKERS] PSQL commands: \quit_if, \quit_unless  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi

2017-01-14 0:20 GMT+01:00 Corey Huinker <corey.huinker@gmail.com>:
Ok, so activity on this thread has died down. I'm not sure if that's consensus or exhaustion.

the original idea \quit_if is leaved? It is pity - it is common use case - and because we cannot to implement macros in psql, then can be very useful
 

Are we good with:
- implementing basic \if EXPR \elseif EXPR \else \endif, where the EXPR is an expression but is currently limited to a simple string that will be evaluated for truth via ParseVariableBool()?

+1
 
- moving beyond trivial expressions in a later commit?

the expressions are in nice to have category - there can be a logic

 if there is only a variable, check the variable; else eval on server and check the result.
 
- leaving loops out for now?

+1

Regards

Pavel

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

Предыдущее
От: Serge Rielau
Дата:
Сообщение: Re: [HACKERS] Packages: Again
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: [HACKERS] how to correctly invalidate a constraint?