Re: Constraints & pg_dump

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Constraints & pg_dump
Дата
Msg-id 200403162319.49467.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: Constraints & pg_dump  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Constraints & pg_dump  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom,

> Isn't this already solved by dumping in dependency order?
>
>             regards, tom lane

Nope.   Problem is, the table depends on the function, and the function 
depends on the table.   pg_dump (in 7.4.1, at least) will dump the table 
first, *with the constraint*, and then the function ... causing table 
creation to fail.

And this isn't come cross-table function either; the constraint that they're 
implementing is partial uniqueness, which is appropriate for a constraint.  

I personally think that the simplest way to do this ... and deal with most 
custom-function-constraint issues ... is to push all constraints containing a 
user-defined  function to the end of the file with the foriegn keys.

(this is for the Bricolage project)

-- 
Josh Berkus
Aglio Database Solutions
San Francisco


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

Предыдущее
От: "Jonathan M. Gardner"
Дата:
Сообщение: Re: Doxygen?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Constraints & pg_dump