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

From David G. Johnston
Subject Re: PSQL commands: \quit_if, \quit_unless
Date
Msg-id CAKFQuwaxFy0rV-kZ=yO9DzBt+zBpNJ0wz_ya7nK==wGWUPL-wg@mail.gmail.com
Whole thread Raw
In response to Re: PSQL commands: \quit_if, \quit_unless  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PSQL commands: \quit_if, \quit_unless
List pgsql-hackers
On Mon, Nov 28, 2016 at 2:07 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Corey Huinker <corey.huinker@gmail.com> writes:
> On Mon, Nov 28, 2016 at 2:03 PM, Fabien COELHO <coelho@cri.ensmp.fr> wrote: 
There's no reason to assume a-priori that this patch creates either naming
conventions or semantics (e.g. what is suitable as a boolean expression)
that we'd be happy with in a larger context.


Would we be happy borrowing the definition of FOUND from pl/pgsql?​

As far as the original problem goes, I wonder whether what you really
want isn't a \quit command that lets you specify psql's exit code.

Actually, I'm seeing this as basically an assertion capability and maybe should be named as such

\assert_is
\assert_isnot ​

​David J.

pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: Time to up bgwriter_lru_maxpages?
Next
From: Corey Huinker
Date:
Subject: Re: PSQL commands: \quit_if, \quit_unless