Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> writes:
> ... that would only help if the unique constraint were created before the
> references constraint.
But in any case, pg_dump ought to be careful to dump index creation
commands before REFERENCES constraints, I should think. If it isn't
doing that, there's a performance hit even if the code manages to work.
regards, tom lane