Re: Dumping/Restoring with constraints?

Поиск
Список
Период
Сортировка
Искать
От
Terry Lee Tucker
Тема
Re: Dumping/Restoring with constraints?
Дата
Msg-id
200808271015.00589.terry@chosen-ones.org
Ответ на
Список
Дерево обсуждения
Dumping/Restoring with constraints? "Phoenix Kiula" <phoenix.kiula@gmail.com>
Re: Dumping/Restoring with constraints? Terry Lee Tucker <terry@chosen-ones.org>
Re: Dumping/Restoring with constraints? "Phoenix Kiula" <phoenix.kiula@gmail.com>
Re: Dumping/Restoring with constraints? Terry Lee Tucker <terry@chosen-ones.org>
Re: Dumping/Restoring with constraints? Tom Lane <tgl@sss.pgh.pa.us>
Re: Dumping/Restoring with constraints? "Phoenix Kiula" <phoenix.kiula@gmail.com>
Re: Dumping/Restoring with constraints? Bill Moran <wmoran@collaborativefusion.com>
Re: Dumping/Restoring with constraints? "Phoenix Kiula" <phoenix.kiula@gmail.com>
Re: Dumping/Restoring with constraints? Bill Moran <wmoran@collaborativefusion.com>
Re: Dumping/Restoring with constraints? "Phoenix Kiula" <phoenix.kiula@gmail.com>
Re: Dumping/Restoring with constraints? Andrew Sullivan <ajs@commandprompt.com>
Re: Dumping/Restoring with constraints? "Scott Marlowe" <scott.marlowe@gmail.com>
Re: Dumping/Restoring with constraints? Tom Lane <tgl@sss.pgh.pa.us>
Re: Dumping/Restoring with constraints? "Phoenix Kiula" <phoenix.kiula@gmail.com>
Re: Dumping/Restoring with constraints? Tom Lane <tgl@sss.pgh.pa.us>
Re: Dumping/Restoring with constraints? "Phoenix Kiula" <phoenix.kiula@gmail.com>
Re: Dumping/Restoring with constraints? Bill Moran <wmoran@collaborativefusion.com>
Re: Dumping/Restoring with constraints? Andrew Sullivan <ajs@commandprompt.com>
Re: Dumping/Restoring with constraints? "Phoenix Kiula" <phoenix.kiula@gmail.com>
Re: Dumping/Restoring with constraints? Andrew Sullivan <ajs@commandprompt.com>
Re: Dumping/Restoring with constraints? Tino Wildenhain <tino@wildenhain.de>
Re: Dumping/Restoring with constraints? "Phoenix Kiula" <phoenix.kiula@gmail.com>
Re: Dumping/Restoring with constraints? Andrew Sullivan <ajs@commandprompt.com>
Re: Dumping/Restoring with constraints? "Phoenix Kiula" <phoenix.kiula@gmail.com>
Re: Dumping/Restoring with constraints? Andrew Sullivan <ajs@commandprompt.com>
Re: Dumping/Restoring with constraints? "Phoenix Kiula" <phoenix.kiula@gmail.com>
Re: Dumping/Restoring with constraints? Andrew Sullivan <ajs@commandprompt.com>
Re: Dumping/Restoring with constraints? "Phoenix Kiula" <phoenix.kiula@gmail.com>
Re: Dumping/Restoring with constraints? Adrian Klaver <aklaver@comcast.net>
Re: Dumping/Restoring with constraints? "Phoenix Kiula" <phoenix.kiula@gmail.com>
Re: Dumping/Restoring with constraints? Adrian Klaver <aklaver@comcast.net>
Re: Dumping/Restoring with constraints? "Phoenix Kiula" <phoenix.kiula@gmail.com>
Re: Dumping/Restoring with constraints? Andrew Sullivan <ajs@commandprompt.com>
Re: Dumping/Restoring with constraints? Andrew Sullivan <ajs@commandprompt.com>
Re: Dumping/Restoring with constraints? Marco Colombo <pgsql@esiway.net>
On Wednesday 27 August 2008 09:36, Phoenix Kiula wrote:
> On Wed, Aug 27, 2008 at 9:29 PM, Terry Lee Tucker  
wrote:
> > We have all sorts of constraints and foreign keys and we have never had
> > any problem with pg_restore related to dumping such that foreign keys are
> > satisfied. You must have data already in the database that violates the
> > restraints. You can restore in two phases; that is, by restoring the
> > schema, and then the data using --disable-triggers. I'm assuming you are
> > doing a binary dump. See the man page for pg_restore.
>
> Thanks for this. I don't have any foreign key violations in my
> existing database. I think the violation is happening because upon
> restoring the table that is being populated checks in another table
> that doesn't yet have data.
>
> I am not using pg_restore. I am just using "psql --file=FILENAME"
> syntax. Is that an issue?

The errors you are having, then, must be related to your own trigger code.  It 
sounds like you will need to prevent those triggers from firing and the only 
way I know how to accomplish that is to do a binary dump and then use 
pg_restore as I indicated earlier. There is no way to disable triggers in 
your method referenced above.
-- 
Terry Lee Tucker
Turbo's IT Manager
Turbo, division of Ozburn-Hessey Logistics
2251 Jesse Jewell Pkwy NE
Gainesville, GA 30501
Tel: (336) 372-6812  Fax: (336) 372-6812  Cell: (336) 404-6987
terry@turbocorp.com
www.turbocorp.com
В списке pgsql-general по дате отправления
От: Phoenix Kiula
Дата:
От: Merlin Moncure
Дата:
FAQ