Re: PSQL commands: \quit_if, \quit_unless

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PSQL commands: \quit_if, \quit_unless
Date: 2016-12-16 20:18:10
Message-ID: CA+TgmoaU4i-nbiwqaZxte38odw1aA5M3GsVpZrbgfp5EozD84Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 16, 2016 at 12:28 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> why do you need special operator for negation? there is only one use case.
> It can be solved by \if_not

That's exactly the kind of thing I *don't* want to do. If you
absolutely must have that and you can't wait until we get a full-blown
expression evaluator, then just swap the \if side with the \else side
and call it good. The whole point here is to avoid introducing weird
hacks for lack of a full expression evaluator that will just become
annoyances once we have one.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2016-12-16 20:21:39 Re: PSQL commands: \quit_if, \quit_unless
Previous Message Robert Haas 2016-12-16 20:15:42 Re: Declarative partitioning vs. sql_inheritance