Re: pg_dump | pg_sql: insert commands and foreign key constraints - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_dump | pg_sql: insert commands and foreign key constraints
Date
Msg-id 17027.1222222835@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump | pg_sql: insert commands and foreign key constraints  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-general
Craig Ringer <craig@postnewspapers.com.au> writes:
> IIRC a patch was circulating (maybe applied to 8.4?) that tries to map
> foreign-key relationships and where possible dump data in dependency
> order so that data-only dumps without circular foreign key references
> will restore correctly with no special user action.

Yeah.  Historically pg_dump has not worried about foreign keys at all
during data-only dumps.  As of CVS HEAD there is some code in there that
will sort the tables according to foreign key constraints, although it
is possible to have circular constraints or self-referential constraints
that defeat this.

            regards, tom lane

pgsql-general by date:

Previous
From: Ralph Smith
Date:
Subject: Using a User-Def function in a query
Next
From: Tom Lane
Date:
Subject: Re: Using a User-Def function in a query