From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Nikhil Sontakke <nikkhils(at)gmail(dot)com> |
Cc: | Noah Misch <noah(at)leadboat(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Jim Nasby <jim(at)nasby(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: how to create a non-inherited CHECK constraint in CREATE TABLE |
Date: | 2012-04-16 16:45:01 |
Message-ID: | 1334588142-sup-7811@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Excerpts from Nikhil Sontakke's message of lun abr 16 03:56:06 -0300 2012:
> > > 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.
Good, I agree with that too.
Are you going to submit an updated patch? I started working on your
original a couple of days ago but got distracted by some family news
here. I'll send it to you so that you can start from there, to avoid
duplicate work.
> 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.
Yeah, I was considering the same thing. "conisonly" isn't a very good
name on its own (it only made sense because the ONLY came from "ALTER
TABLE ONLY").
--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From | Date | Subject | |
---|---|---|---|
Next Message | Alex | 2012-04-16 17:15:10 | Re: Bug tracker tool we need |
Previous Message | Merlin Moncure | 2012-04-16 16:41:30 | Re: JSON for PG 9.2 |