Kamil Giza <kamilg@zeto.olsztyn.pl> writes:
> It's a problem because after restore, server is looking for sequence in
> schema "public" but sequence was created in schema "schema".
No, it doesn't. regclass constants don't work that way; the sequence is
identified by OID, and isn't subject to search path issues at all. You
are assuming a problem that does not exist anymore.
regards, tom lane