Hi,
restoring the database only from pg_dump/pg_restore
seems to be impossible if one uses foreign keys much.
The tables referenced are most of the time not available
by the time the referencing tables are created. Even
restoring by OID order does not help.
How are people doing this? The only solution I found was
editing the restore script by hand and transform all
constraints to ALTER TABLE statements at the end.
The other problem was that there are apparently no user
information in the dump to restore users too.
What solutions are available?
I've tried to go thru the source code of pg_dump
buts a bit organic ;) I think it schould move
all constraints out of the table definition and
put them after the whole restore.
Regards
Tino