Re: how to create a non-inherited CHECK constraint in CREATE TABLE - Mailing list pgsql-hackers

From Nikhil Sontakke
Subject Re: how to create a non-inherited CHECK constraint in CREATE TABLE
Date
Msg-id CANgU5Zf4zrt8TTbFQPDuNhY9=G3NrP8DRsf0UB1wG03XjfTT-w@mail.gmail.com
Whole thread Raw
In response to Re: how to create a non-inherited CHECK constraint in CREATE TABLE  (Noah Misch <noah@leadboat.com>)
Responses Re: how to create a non-inherited CHECK constraint in CREATE TABLE
List pgsql-hackers

 
> Displace yes. It would error out if someone says
>
> ALTER TABLE ONLY... CHECK ();
>
> suggesting to use the ONLY with the CHECK.

I'd say the behavior for that case can revert to the PostgreSQL 9.1 behavior.
If the table has children, raise an error.  Otherwise, add an inheritable
CHECK constraint, albeit one lacking inheritors at that moment.


Ok, that sounds reasonable.

Another thing that we should consider is that if we are replacing ONLY with NO INHERIT, then instead of just making a cosmetic syntactic change, we should also replace all the is*only type of field names with noinherit for the sake of completeness and uniformity.

Regards,
Nikhils

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: 9.3 Pre-proposal: Range Merge Join
Next
From: Amit Kapila
Date:
Subject: Re: Improving our clauseless-join heuristics