=?ISO-8859-1?Q?Lu=EDs_Sousa?= <llsousa@ualg.pt> writes:
> Using the schema below, doing a pg_dump -Fc, delete all data, and a
> pg_restore -a, the sequence of inserting data isn't correct issuing an
> error.
Data-only restores make no attempt to avoid foreign-key constraint
problems --- in general there is no solution, since you could have
circular constraints.
You could drop and re-add the FK constraints, or if you trust that the
data is valid there's the --disable-triggers option to suppress FK
constraint checking.
regards, tom lane