Re: [HACKERS] PSQL commands: \quit_if, \quit_unless - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: [HACKERS] PSQL commands: \quit_if, \quit_unless
Date
Msg-id CAFj8pRBOWTvAGBar=uVvcu75b5eZA9TUJifFfCgGNfZhzErvZQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] PSQL commands: \quit_if, \quit_unless  (Corey Huinker <corey.huinker@gmail.com>)
Responses Re: [HACKERS] PSQL commands: \quit_if, \quit_unless  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Serge Rielau
Date:
Subject: Re: [HACKERS] Packages: Again
Next
From: Pavel Stehule
Date:
Subject: Re: [HACKERS] how to correctly invalidate a constraint?