Re: [GENERAL] plpgsql constraint checked data fails to restore - Mailing list pgsql-hackers

From Jan Wieck
Subject Re: [GENERAL] plpgsql constraint checked data fails to restore
Date
Msg-id 42BAE5AC.1090801@Yahoo.com
Whole thread Raw
Responses Re: [GENERAL] plpgsql constraint checked data fails to restore
List pgsql-hackers
Added pgsql-hackers
Added Bruce Momjian


On 6/23/2005 12:19 PM, Michael Fuhr wrote:
>> The question I have is how exactly you manage to get the trigger fired
>> when restoring the dump. By default, the dump created by pg_dump will
>> create the table, fill in the data and create the trigger(s) only after
>> that.
>
> Not true for CHECK constraints -- pg_dump creates them with the
> CREATE TABLE statement:

This is still true in 8.1's pg_dump, even though check constraints can
be added later. Even though it is bad practice to have functions that
rely on or even manipulate other objects in a CHECK constraint, I think
pg_dump should add the check constraints in the same manner as it does
triggers.

Bruce, do we have a TODO item for this?


Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #

pgsql-hackers by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Strange logic for partial index proving
Next
From: Euler Taveira de Oliveira
Date:
Subject: Re: The contrib hit list