Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-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

pgsql-hackers by date

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

pgsql-committers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group