Re: syntax sugar for conditional check

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Alexander Ostrow <aj(at)epcylon(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: syntax sugar for conditional check
Date: 2016-04-01 16:57:31
Message-ID: CAKFQuwZ30Pk0OCeW3qv7DttXfc1nnRCq+Roci=ckXHip20W_Ng@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 31, 2016 at 10:19 AM, Alexander Ostrow <aj(at)epcylon(dot)com> wrote:

> Hello,
>
> I thought it would be cool to have conditional check syntax, which gets
> converted to simple check constraint syntax.
>
> Here’s a gist:
>
> https://gist.github.com/aj0strow/5a07f2ddcad324c4dac2c4095c821999
>
> It’s just sugar, but i think it would make check constraints easier to
> read, and easier to write without backwards boolean logic.
>

For future reference please make every effort to make emails to the list
self-contained - which has the added benefit of avoid link expiration in
the future.

As to the recommendation at hand - I don't see significant value in
implementing non-SQL Standard syntax in this area.

David J.
​​

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2016-04-01 17:06:42 Re: [COMMITTERS] pgsql: Improve internationalization of messages involving type names
Previous Message Tom Lane 2016-04-01 16:52:42 Re: Performance improvement for joins where outer side is unique