Commit 419a23b4 authored by Peter Eisentraut's avatar Peter Eisentraut

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>
parent 1fe33252
...@@ -3627,7 +3627,7 @@ dumpPublicationTable(Archive *fout, PublicationRelInfo *pubrinfo) ...@@ -3627,7 +3627,7 @@ dumpPublicationTable(Archive *fout, PublicationRelInfo *pubrinfo)
query = createPQExpBuffer(); query = createPQExpBuffer();
appendPQExpBuffer(query, "ALTER PUBLICATION %s ADD TABLE", appendPQExpBuffer(query, "ALTER PUBLICATION %s ADD TABLE ONLY",
fmtId(pubrinfo->pubname)); fmtId(pubrinfo->pubname));
appendPQExpBuffer(query, " %s;", appendPQExpBuffer(query, " %s;",
fmtId(tbinfo->dobj.name)); fmtId(tbinfo->dobj.name));
......
...@@ -4423,7 +4423,7 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog ...@@ -4423,7 +4423,7 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
create_sql => create_sql =>
'ALTER PUBLICATION pub1 ADD TABLE dump_test.test_table;', 'ALTER PUBLICATION pub1 ADD TABLE dump_test.test_table;',
regexp => qr/^ regexp => qr/^
\QALTER PUBLICATION pub1 ADD TABLE test_table;\E \QALTER PUBLICATION pub1 ADD TABLE ONLY test_table;\E
/xm, /xm,
like => { like => {
binary_upgrade => 1, binary_upgrade => 1,
...@@ -4457,7 +4457,7 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog ...@@ -4457,7 +4457,7 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
create_sql => create_sql =>
'ALTER PUBLICATION pub1 ADD TABLE dump_test.test_second_table;', 'ALTER PUBLICATION pub1 ADD TABLE dump_test.test_second_table;',
regexp => qr/^ regexp => qr/^
\QALTER PUBLICATION pub1 ADD TABLE test_second_table;\E \QALTER PUBLICATION pub1 ADD TABLE ONLY test_second_table;\E
/xm, /xm,
like => { like => {
binary_upgrade => 1, binary_upgrade => 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment