Fix sequences dependencies tracking. (#397)
A single sequence could be used by more than one table/column thanks to
calling the nextval() function in the default value definition of the
column. That said, a sequence is OWNED BY a single table.
In this patch we fix the case where the table that owns the sequence is
filtered out from the pgcopydb scope while another table that uses the same
sequence is to be copied over... with the sequence, then.
A simple way to create the situation is using the following DDL:
create table app.foo(id bigserial, f1 text);
create table copy.foo(like app.foo including all);
And then filter-out schema app from pgcopydb scope.
parent
59dc57ab
Please register or sign in to comment