pg_restore order and check constraints

Поиск
Список
Период
Сортировка
От Moshe Jacobson
Тема pg_restore order and check constraints
Дата
Msg-id CAJ4CxLnapEfVNOJMNCXCg7Sf-Po=7y5=5bf2BkLqhSt1aTfEVw@mail.gmail.com
обсуждение исходный текст
Ответы Re: pg_restore order and check constraints  (Martín Marqués <martin@2ndquadrant.com>)
Список pgsql-general
Hi,

I recently added a check constraint onto a table in my database, that uses a stored procedure to check one of the inserted columns against the data of another table.

I know that this is stretching the limit of what a check constraint is meant to be, but is there a way, short of editing the pg_restore list manually every time, to guarantee that the table used for validation is populated before the table with the data being validated? 

Right now it is restoring out of order, and the table is not getting populated correctly.

if I have to rewrite as a trigger, I will do that, but I like the check constraint because it checks all of the entries when it's applied. Any suggestions?

--
Moshe Jacobson
Nead Werx, Inc. | Manager of Systems Engineering
2323 Cumberland Parkway, Suite 201 | Atlanta, GA 30339
moshe@neadwerx.com | 
www.neadwerx.com

"Quality is not an act, it is a habit." -- Aristotle

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: File System backup
Следующее
От: Tom Lane
Дата:
Сообщение: Re: I want to make an example of using parameterized path