Re: creating CHECK constraints as NOT VALID

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(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 18:21:39
Message-ID: 1307211556-sup-7406@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Excerpts from Simon Riggs's message of sáb jun 04 09:11:52 -0400 2011:
> On Thu, Jun 2, 2011 at 5:48 PM, Alvaro Herrera
> <alvherre(at)commandprompt(dot)com> wrote:

> > 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?

Thanks for the review. I already committed it on 9.1:
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=048417511aef8d5fb2d541b17b73afc730935cd5

I'd still like your opinion on the psql bits. Should they be reverted?
I haven't verified what the output currently looks like.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 2011-06-04 20:51:19 Re: ts_count
Previous Message Tom Lane 2011-06-04 17:39:19 Re: plperl fails with perl 5.14.0