pglogical
pglogical copied to clipboard
Make sure we use a correctly deformed tuple when doing initial sync.
Currently, this test case will produce a wrong set of data, when calling table_data_filtered() like we do for an initial table sync:
CREATE EXTENSION IF NOT EXISTS pglogical;
CREATE TABLE bar(id bigint primary key);
INSERT INTO bar SELECT t.id FROM generate_series(1, 10) AS t(id);
SELECT * FROM bar;
ALTER TABLE bar ADD COLUMN value TEXT DEFAULT 'me';
SELECT * FROM bar;
COPY (SELECT * FROM pglogical.table_data_filtered(NULL::"public"."bar",
'"public"."bar"'::regclass, ARRAY['default'])) TO stdout;
Instead of the correct value 'me', a NULL value will be returned.