Unverified Commit 012bd2ae authored by Dimitri Fontaine's avatar Dimitri Fontaine Committed by GitHub
Browse files

Fix Postgres catalog queries that implement sequences filtering. (#246)

We need to find sequences that are associated with table columns either as
default values (through pg_depend entry between the sequence and pg_attrdef)
or as an identity column (through a pg_depend entry between the sequence and
the table column directly).

Also, when a sequence is filtered-out from our pg_restore activity, then we
need to also filter-out the archive TOC entry for the default value that
uses the sequence, in addition to filtering out the table and the sequence
themselves.

  ALTER TABLE ONLY public.bar ALTER COLUMN id SET DEFAULT nextval(...)

Otherwise we get ERROR: relation does not exist in pg_restore.
parent 187a89fc
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment