Insertion order violates Foreign keys

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
worldwalker
Posts: 5
Joined: Sat 07 Nov 2009 08:18

Insertion order violates Foreign keys

Post by worldwalker » Sun 22 Nov 2009 18:17

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.

worldwalker
Posts: 5
Joined: Sat 07 Nov 2009 08:18

Post by worldwalker » Mon 23 Nov 2009 16:58

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?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 24 Nov 2009 09:19

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.

Post Reply