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

From Corey Huinker
Subject Re: PSQL commands: \quit_if, \quit_unless
Date
Msg-id CADkLM=eF-269H=k_UGGQ6xCEcECr+PV+Cq_49vBdLHJCZj_HWA@mail.gmail.com
Whole thread Raw
In response to Re: PSQL commands: \quit_if, \quit_unless  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers

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.


The ability to specify an exit code was part of the brainstorming, yes. But with it was the ability to conditionally quit.
 
Actually, I'm seeing this as basically an assertion capability and maybe should be named as such

\assert_is
\assert_isnot ​

That came up too! I see real value in the ability to test for error conditions. I just had a more immediate need for a non-error exit condition.
 


 

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: PSQL commands: \quit_if, \quit_unless
Next
From: Petr Jelinek
Date:
Subject: Re: Tackling JsonPath support