Re: PSQL commands: \quit_if, \quit_unless

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, PostgreSQL <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PSQL commands: \quit_if, \quit_unless
Date: 2016-11-28 21:23:07
Message-ID: CAKFQuwaxFy0rV-kZ=yO9DzBt+zBpNJ0wz_ya7nK==wGWUPL-wg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 28, 2016 at 2:07 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Corey Huinker <corey(dot)huinker(at)gmail(dot)com> writes:
> > On Mon, Nov 28, 2016 at 2:03 PM, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2016-11-28 21:27:38 Re: PSQL commands: \quit_if, \quit_unless
Previous Message Jim Nasby 2016-11-28 21:20:22 Re: Time to up bgwriter_lru_maxpages?