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

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
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