Page 1 of 1

Insertion order violates Foreign keys

Posted: Sun 22 Nov 2009 18:17
by worldwalker
Hi all,
I did a backup with pgdump as dmData option and while restoring the database a Foreign key violation occurs, despite the creation order was respected when I first created the db manually. So, is there an option to respect the creation order?
Another thing I figured out, why when dumping the whole database all the sequences become owned by "postres" while thery were originnaly owned by "public", is there an option for that, thanks for your reply.

Posted: Mon 23 Nov 2009 16:58
by worldwalker
Hi,
It seems that this issue comes from the fact that the tables are sorted from A to Z in the dump file, did I miss something to keep the original order or I have to do it by myselg programmatically?

Posted: Tue 24 Nov 2009 09:19
by Plash
Currently TPgDump does not have a feature for sorting tables by dependencies. You can dump tables one by one and add to a commom script in the correct order.