From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Jaime Casanova <jaime(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: FK NOT VALID can't be deferrable? |
Date: | 2011-06-15 20:14:28 |
Message-ID: | 1308168833-sup-3188@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Excerpts from Tom Lane's message of mié jun 15 11:54:25 -0400 2011:
> Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> writes:
> > On 15 June 2011 07:56, Jaime Casanova <jaime(at)2ndquadrant(dot)com> wrote:
> >> Testing the CHECK NOT VALID patch i found $subject... is this intended?
>
> > Aside from the ugliness of the code, we can't just add a
> > ConstraintAttributeSpec to the second block, because that would
> > enforce an order to these options.
>
> > OTOH adding NOT VALID to ConstraintAttributeSpec is a bit invasive,
> > since it's used in quite a few places, including CREATE TABLE, where
> > NOT VALID is never allowed.
>
> I think we need to do the second one, ie, add it to
> ConstraintAttributeSpec and do what's necessary to filter later.
> The reason we have a problem here is exactly that somebody took
> shortcuts.
>
> It'd probably be sufficient to have one or two places in
> parse_utilcmds.c know which variants of Constraint actually support
> NOT VALID, and throw an error for the rest.
So is somebody from 2nd Quadrant going to supply a patch to fix this?
--
Á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 | Jaime Casanova | 2011-06-15 20:20:59 | Re: FK NOT VALID can't be deferrable? |
Previous Message | Peter Eisentraut | 2011-06-15 20:13:59 | flexible array members |