Re: [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Thom Brown <thom(at)linux(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jim Nasby <jim(at)nasby(dot)net>, Joshua D(dot) Drake <jd(at)commandprompt(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID
Date: 2011-11-25 21:24:50
Message-ID: 1322255803-sup-3568@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers


Excerpts from Dean Rasheed's message of vie nov 25 13:16:29 -0300 2011:

> There is a similar problem with NOT VALID check constraints on
> domains. These are still being dumped as part of the CREATE DOMAIN
> statement, which is invalid syntax, so they need to be dumped
> separately from the domain creation, and presumably also after any
> data for tables that use them.

Doh, thanks. I just pushed a patch that should close this bug. I
didn't do anything in particular to ensure that the constraint is dumped
after tables that use it, but pg_dump does it that way anyway -- I think
the reason is that separate constraints are always loaded at the end of
the dump, after all data has been loaded. (AFAIK FKs have always worked
like this, because it's much faster to load them after the data has been
imported.)

--
Á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-committers by date

  From Date Subject
Next Message Alvaro Herrera 2011-11-25 21:28:20 Re: [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID
Previous Message Alvaro Herrera 2011-11-25 21:20:03 pgsql: Fix unvalidated check constraints on domains, too

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2011-11-25 21:28:20 Re: [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID
Previous Message Bruce Momjian 2011-11-25 21:01:20 Re: xpath_table