Re: [GENERAL] plpgsql constraint checked data fails to restore

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: [GENERAL] plpgsql constraint checked data fails to restore
Дата
Msg-id 42BAE5AC.1090801@Yahoo.com
обсуждение исходный текст
Ответы Re: [GENERAL] plpgsql constraint checked data fails to restore  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Strange logic for partial index proving
Следующее
От: Euler Taveira de Oliveira
Дата:
Сообщение: Re: The contrib hit list