From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: CHECK NO INHERIT syntax |
Date: | 2012-07-19 13:40:56 |
Message-ID: | CA+TgmobE9n2qwzPN3nPpOK-901_Ue+P9iNAPM2wVHqWEO1wOQg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jul 18, 2012 at 5:49 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> Sorry to raise this once again, but I still find this CHECK NO INHERIT
> syntax to a bit funny. We are currently using something like
>
> CHECK NO INHERIT (foo > 0)
>
> But we already have a different syntax for attaching attributes to
> constraints (NOT DEFERRABLE, NOT VALID, etc.), so it would make more
> sense to have
>
> CHECK (foo > 0) NO INHERIT
>
> Besides consistency, this makes more sense, because the attribute is a
> property of the constraint as a whole, not of the "checking".
>
> This would also extend more easily to other constraint types. For
> example, when unifying CHECK and NOT NULL constraints, as is planned, or
> when allowing inherited unique constraints, as is planned further down
> the road.
+1.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2012-07-19 13:41:11 | reminder: 9.2 branch needs building by buildfarm animals |
Previous Message | Robert Haas | 2012-07-19 13:11:31 | Re: bgwriter, regression tests, and default shared_buffers settings |