Re: pg_restore order and check constraints
От
Martín Marqués
Тема
Re: pg_restore order and check constraints
Дата
Msg-id
51C762F4.7030609@2ndquadrant.com
Ответ на
pg_restore order and check constraints (Moshe Jacobson)
Список
Дерево обсуждения
pg_restore order and check constraints Moshe Jacobson <moshe@neadwerx.com>
Re: pg_restore order and check constraints Martín Marqués <martin@2ndquadrant.com>
Re: pg_restore order and check constraints Moshe Jacobson <moshe@neadwerx.com>
Re: pg_restore order and check constraints Alban Hertroys <haramrae@gmail.com>
El 23/06/13 13:34, Moshe Jacobson escribió: > 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. Is it possible to see the function? > 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? What for? If the dumps actually are taken without contraints, data restored (much faster as no constraints have to be checked, and just then constraints are added via ALTER TABLE. > Right now it is restoring out of order, and the table is not getting > populated correctly. Why not? > 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? We'd need to see how the constraint is added, and the function you say is used for checking the constrants. -- Martín Marqués http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-general по дате отправления