1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-11 05:41:32 +03:00

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>
This commit is contained in:
Peter Eisentraut 2017-04-17 09:47:39 -04:00
parent 1fe33252a0
commit 419a23b478
2 changed files with 3 additions and 3 deletions

View File

@ -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));

View File

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