From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Thom Brown <thom(at)linux(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: creating CHECK constraints as NOT VALID |
Date: | 2011-06-04 13:11:52 |
Message-ID: | BANLkTimUYu++kztJSNA2KACpp+RDDM0Uiw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jun 2, 2011 at 5:48 PM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> Excerpts from Alvaro Herrera's message of mié jun 01 20:56:12 -0400 2011:
>> Excerpts from Thom Brown's message of mié jun 01 19:48:44 -0400 2011:
>>
>> > Is this expected?
>> > [ pg_dump fails to preserve not-valid status of constraints ]
>>
>> Certainly not.
>>
>> > Shouldn't the constraint be dumped as not valid too??
>>
>> Sure, I'll implement that tomorrow.
>
> Actually, it turns out that NOT VALID foreign keys were already buggy
> here, and fixing them automatically fixes this case as well, because the
> fix involves touching pg_get_constraintdef to dump the flag. This also
> gets it into psql's \d. Patch attached.
>
> (Maybe the changes in psql's describe.c should be reverted, not sure.)
Thanks. As soon as Thom said that, I thought "ahh... didn't do that".
Patch looks fine. Will you commit this patch to 9.1 now, or would you
like me to?
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2011-06-04 13:53:20 | Re: Pull up aggregate subquery |
Previous Message | Andrew Dunstan | 2011-06-04 12:47:02 | ts_count |