Re: [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID
Date
Msg-id 1322255803-sup-3568@alvh.no-ip.org
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID  (Dean Rasheed <dean.a.rasheed@gmail.com>)
List 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@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: xpath_table
Next
From: Alvaro Herrera
Date:
Subject: Re: [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID