Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 187331f

Browse files
committed
Fix pg_upgrade to handle event triggers in extensions correctly.
pg_dump with --binary-upgrade must emit ALTER EXTENSION ADD commands for all objects that are members of extensions. It forgot to do so for event triggers, as per bug #15310 from Nick Barnes. Back-patch to 9.3 where event triggers were introduced. Haribabu Kommi Discussion: https://postgr.es/m/153360083872.1395.4593932457718151600@wrigleys.postgresql.org
1 parent f736430 commit 187331f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17293,6 +17293,10 @@ dumpEventTrigger(Archive *fout, EventTriggerInfo *evtinfo)
1729317293
appendPQExpBuffer(delqry, "DROP EVENT TRIGGER %s;\n",
1729417294
qevtname);
1729517295

17296+
if (dopt->binary_upgrade)
17297+
binary_upgrade_extension_member(query, &evtinfo->dobj,
17298+
"EVENT TRIGGER", qevtname, NULL);
17299+
1729617300
if (evtinfo->dobj.dump & DUMP_COMPONENT_DEFINITION)
1729717301
ArchiveEntry(fout, evtinfo->dobj.catId, evtinfo->dobj.dumpId,
1729817302
evtinfo->dobj.name, NULL, NULL,

0 commit comments

Comments
 (0)