pg_dump and restore problem with function as DEFAULT-Constraint

Поиск
Список
Период
Сортировка
От Markus Schulz
Тема pg_dump and restore problem with function as DEFAULT-Constraint
Дата
Msg-id 200702271744.06730.msc@antzsystem.de
обсуждение исходный текст
Ответы Re: pg_dump and restore problem with function as DEFAULT-Constraint  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Re: pg_dump and restore problem with function as DEFAULT-Constraint  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hello,

i have some trouble with dumping and restoring a database with
postgresql 7.4.7-6sarge4 (debian sarge).

Some tables have plpgsql-functions as DEFAULT contraints. But these
functions are dumped after the CREATE TABLE command. Now these tables
can't be created on restore.

If i'm dumping only structure and import twice in a new and empty
database (this works), i can't restore the data-only dump. Cause in the
data-only dump the table order was wrong in respect to FOREIGN KEY
constraints and the constraints are now active (instead of a full-dump,
where constraints will be created after data was inserted).

Why DEFAULT (and NOT NULL) constraints would'nt be added after data
insertion? (like Primary-Key and Foreign-Key)

What can i do to enforce the order of plpgsql functions prior to all
table structures?

--
Markus Schulz - msc@antzsystem.de

В списке pgsql-general по дате отправления:

Предыдущее
От: "David Gagnon"
Дата:
Сообщение: Re: select ARRAY[1,4,3] @> ARRAY[3,1] gives ERROR: operator does not exist: integer[] @> integer[] ???
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: pg_dump and restore problem with function as DEFAULT-Constraint