I started using the -t
argument of pg_restore to only restore some tables, which has worked well for read-only workflows.
The problem is that the -t
seems to not restore the FK constraints nor sequences applied to the table/column.
Regarding the former (sequence), it seems that the tables restored with -t
which had an id
column with a modifier of not null default nextval('report_id_seq'::regclass)
was restored with just not null
, so the sequence isn't applied, which is an obvious.
Is there a way to use pg_restore
with explicit tables using -t
that also restore foreign-key constraints and sequences?