mirror of
https://github.com/postgres/postgres.git
synced 2025-05-12 16:21:30 +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:
parent
1fe33252a0
commit
419a23b478
@ -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
|
|||||||
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
|
|||||||
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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user