aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-04-17 09:47:39 -0400
committerPeter Eisentraut <peter_e@gmx.net>2017-04-17 09:51:53 -0400
commit419a23b478ae760b797188341ddce5b41322684b (patch)
tree1c7a84b6e346e7a756cedf8642ce5e8e9d4d288b /src
parent1fe33252a08c285de9e84615cfde0569b9a75e58 (diff)
downloadpostgresql-419a23b478ae760b797188341ddce5b41322684b.tar.gz
postgresql-419a23b478ae760b797188341ddce5b41322684b.zip
pg_dump: Emit ONLY before table added to publication
This is necessary to be able to reproduce publication membership correctly if tables are involved in inheritance. Author: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_dump.c2
-rw-r--r--src/bin/pg_dump/t/002_pg_dump.pl4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 3eccfa626bf..22b5f784dc0 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -3627,7 +3627,7 @@ dumpPublicationTable(Archive *fout, PublicationRelInfo *pubrinfo)
query = createPQExpBuffer();
- appendPQExpBuffer(query, "ALTER PUBLICATION %s ADD TABLE",
+ appendPQExpBuffer(query, "ALTER PUBLICATION %s ADD TABLE ONLY",
fmtId(pubrinfo->pubname));
appendPQExpBuffer(query, " %s;",
fmtId(tbinfo->dobj.name));
diff --git a/src/bin/pg_dump/t/002_pg_dump.pl b/src/bin/pg_dump/t/002_pg_dump.pl
index 4dd208e8e11..ccd0ed6a539 100644
--- a/src/bin/pg_dump/t/002_pg_dump.pl
+++ b/src/bin/pg_dump/t/002_pg_dump.pl
@@ -4423,7 +4423,7 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
create_sql =>
'ALTER PUBLICATION pub1 ADD TABLE dump_test.test_table;',
regexp => qr/^
- \QALTER PUBLICATION pub1 ADD TABLE test_table;\E
+ \QALTER PUBLICATION pub1 ADD TABLE ONLY test_table;\E
/xm,
like => {
binary_upgrade => 1,
@@ -4457,7 +4457,7 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
create_sql =>
'ALTER PUBLICATION pub1 ADD TABLE dump_test.test_second_table;',
regexp => qr/^
- \QALTER PUBLICATION pub1 ADD TABLE test_second_table;\E
+ \QALTER PUBLICATION pub1 ADD TABLE ONLY test_second_table;\E
/xm,
like => {
binary_upgrade => 1,