Re: Constraints & pg_dump

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Constraints & pg_dump
Дата
Msg-id 21995.1079508980@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Constraints & pg_dump  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: Constraints & pg_dump  (Andrew Dunstan <andrew@dunslane.net>)
Re: Constraints & pg_dump  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
>> Isn't this already solved by dumping in dependency order?

> 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.

Um ... by "already" I meant "in CVS tip", not "in 7.4.*".  So I'm not
quite sure whether your issue is still live or not.  But I'll guess
anyway:

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

Is it?  Our present handling of CHECK constraints cannot reasonably be
thought to support anything but row-local constraints.  If they're using
a function to make an end-run around the check that prohibits subselects
in CHECK constraints, then their problems are much more serious than
whether pg_dump dumps the database in an order that manages to avoid
failure.  That kind of constraint just plain does not work, because it
won't get rechecked when the implicitly referenced rows change.
        regards, tom lane


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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Constraints & pg_dump
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: Doxygen?