Excerpts from Tom Lane's message of vie jul 20 16:12:05 -0400 2012:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > True. I have added an error check at creation time. Please suggest
> > improved wording for the message:
> > alvherre=# create domain positiveint2 as int check (value > 0) no inherit;
> > ERROR: CHECK constraints for domains cannot be NO INHERIT
> I think "CHECK constraints for domains cannot be marked NO INHERIT"
> would be fine.
> > ConstraintElem:
> > - CHECK opt_no_inherit '(' a_expr ')' ConstraintAttributeSpec
> > + CHECK '(' a_expr ')' opt_no_inherit ConstraintAttributeSpec
> This doesn't seem to me to meet the principle of least surprise. Surely
> NO INHERIT ought to be folded into ConstraintAttributeSpec so that it
> acts like other constraint decorations, ie order isn't significant.
Oh, true; that's a bit more involved. I verified it works correctly to
have a constraint marked NOT VALID NO INHERIT or the other way around.
I haven't checked whether the changes to ConstraintAttributeSpec have
side effects -- I think it's OK but I might be missing something.
Here's a (hopefully) complete patch.
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
In response to
pgsql-hackers by date
|Next:||From: Adam Crews||Date: 2012-07-21 05:24:11|
|Subject: postgres 9 bind address for replication|
|Previous:||From: Chris Angelico||Date: 2012-07-21 01:57:43|
|Subject: Re: Pg_ctl promote -- wait for slave to be promoted fully ?|