Re: syntax sugar for conditional check - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: syntax sugar for conditional check
Date
Msg-id CAFj8pRACb+eTs6rBdpf=_xm625eWUyezXbEkR_0P-6qSNSdOdA@mail.gmail.com
Whole thread Raw
In response to Re: syntax sugar for conditional check  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers


2016-04-01 18:57 GMT+02:00 David G. Johnston <david.g.johnston@gmail.com>:
On Thu, Mar 31, 2016 at 10:19 AM, Alexander Ostrow <aj@epcylon.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:


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.

+1

This formula should be known to all developers

Regards

Pavel


David J.
​​


pgsql-hackers by date:

Previous
From: "Karl O. Pinc"
Date:
Subject: Re: PQsendQuery+PQgetResult+PQsetSingleRowMode limitations and support
Next
From: Tom Lane
Date:
Subject: Re: syntax sugar for conditional check