0002-Test-publication-row-filters-in-pg_dump-tes-20220302.patch
text/x-patch
Filename: 0002-Test-publication-row-filters-in-pg_dump-tes-20220302.patch
Type: text/x-patch
Part: 1
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch 0002
Subject: Test publication row filters in pg_dump tests
| File | + | − |
|---|---|---|
| src/bin/pg_dump/t/002_pg_dump.pl | 3 | 3 |
From 8ee67dd52a1fc08837aa85979dfc0842cc968012 Mon Sep 17 00:00:00 2001
From: Tomas Vondra <tomas.vondra@postgresql.org>
Date: Tue, 1 Mar 2022 15:25:56 +0100
Subject: [PATCH 2/3] Test publication row filters in pg_dump tests
Commit 52e4f0cd47 added support for row filters when replicating tables,
but the commit added no pg_dump tests for this feature. So add at least
a simple test.
---
src/bin/pg_dump/t/002_pg_dump.pl | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/bin/pg_dump/t/002_pg_dump.pl b/src/bin/pg_dump/t/002_pg_dump.pl
index dd065c758fa..c3bcef8c0ec 100644
--- a/src/bin/pg_dump/t/002_pg_dump.pl
+++ b/src/bin/pg_dump/t/002_pg_dump.pl
@@ -2407,12 +2407,12 @@ my %tests = (
},
},
- 'ALTER PUBLICATION pub1 ADD TABLE test_second_table' => {
+ 'ALTER PUBLICATION pub1 ADD TABLE test_second_table WHERE (col1 = 1)' => {
create_order => 52,
create_sql =>
- 'ALTER PUBLICATION pub1 ADD TABLE dump_test.test_second_table;',
+ 'ALTER PUBLICATION pub1 ADD TABLE dump_test.test_second_table WHERE (col1 = 1);',
regexp => qr/^
- \QALTER PUBLICATION pub1 ADD TABLE ONLY dump_test.test_second_table;\E
+ \QALTER PUBLICATION pub1 ADD TABLE ONLY dump_test.test_second_table WHERE ((col1 = 1));\E
/xm,
like => { %full_runs, section_post_data => 1, },
unlike => { exclude_dump_test_schema => 1, },
--
2.34.1