Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: pg_dump and foreign keys troubles



"Paolo Negri" <hungrylist(at)gmail(dot)com> writes:
> 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.
> ...
> How can I tell to pg_dump to dump the schema with foreign keys
> construct instead of creating constraint trigger?

You can't: the information just isn't there in 7.3.  You'll need to look
at the trigger arguments and reconstruct the FKs.

IIRC the contrib/adddepend script might be able to help you with this.

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group