On Thu, Apr 12, 2012 at 10:50:31AM +0530, Nikhil Sontakke wrote:
> > > CHECK NO INHERIT sounds fine to me; will that display ALTER TABLE ONLY
> > > x as the one true way of doing this?
> >
> > s/display/displace/, I think you meant? Yeah, that's what I understand
> > the proposal to be.
+1 for that proposal.
> 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.
Thanks,
nm