DROP PUBLICATION IF EXISTS pub1;
DROP PUBLICATION IF EXISTS pub2;
DROP TABLE IF EXISTS t1;
SELECT pg_drop_replication_slot('test');

CREATE TABLE  t1 (
	c1 int,
	c2 int
);

CREATE PUBLICATION pub1 for TABLE t1(c1);
CREATE PUBLICATION pub2 for TABLE t1(c2);

SELECT * FROM pg_create_logical_replication_slot('test', 'pgoutput');

INSERT INTO t1 (c1, c2) VALUES(1, 1);
INSERT INTO t1 (c1, c2) VALUES(2, 2);

SELECT * FROM pg_logical_slot_get_binary_changes('test', NULL, NULL, 'proto_version', '3', 'publication_names', 'pub1, pub2');

SELECT * FROM pg_logical_slot_get_binary_changes('test', NULL, NULL, 'proto_version', '3', 'publication_names', 'pub1, pub2');
