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
Please register or sign in to comment