pg_dump and foreign keys troubles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

I have a dump of a large DB executed with pg_dump (schema and data together).
The original schema declares some foreign keys constaints.

The problem is in the pg_dump all the foreign keys disappear from the
tables because thay are rendered instead as CREATE CONSTRAINT
TRIGGERS.

My problem is that I have to load the dump (from a 7.3) in a brand new
database (8.1) and then I need to do quite a few changes to the schema
dropping some old foreign constraint and adding some different ones.
Since the new datadabase restored from the dump doesn't know about the
old foreign keys but has just a bunch of constraint trigger, it
becomes really trichy to do this kind of job.

How can I tell to pg_dump to dump the schema with foreign keys
construct instead of creating constraint trigger?
If it's impossible what is the common practice to work arount this problem?

thanks

Paolo


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux