mirror of
https://github.com/postgres/postgres.git
synced 2025-05-21 15:54:08 +03:00
Fix ordering of obj id for Rules and EventTriggers in pg_dump.
getSchemaData() must identify extension member objects and mark them as not to be dumped. This must happen after reading all objects that can be direct members of extensions, but before we begin to process table subsidiary objects. Both rules and event triggers were wrong in this regard. Backport rules portion of patch to 9.1 -- event triggers do not exist prior to 9.3. Suggested fix by Tom Lane, initial complaint and patch by me.
This commit is contained in:
parent
5cd77baab3
commit
1723df6e4a
@ -202,10 +202,6 @@ getSchemaData(Archive *fout, int *numTablesPtr)
|
||||
write_msg(NULL, "reading table inheritance information\n");
|
||||
inhinfo = getInherits(fout, &numInherits);
|
||||
|
||||
if (g_verbose)
|
||||
write_msg(NULL, "reading rewrite rules\n");
|
||||
getRules(fout, &numRules);
|
||||
|
||||
/*
|
||||
* Identify extension member objects and mark them as not to be dumped.
|
||||
* This must happen after reading all objects that can be direct members
|
||||
@ -240,6 +236,10 @@ getSchemaData(Archive *fout, int *numTablesPtr)
|
||||
write_msg(NULL, "reading triggers\n");
|
||||
getTriggers(fout, tblinfo, numTables);
|
||||
|
||||
if (g_verbose)
|
||||
write_msg(NULL, "reading rewrite rules\n");
|
||||
getRules(fout, &numRules);
|
||||
|
||||
*numTablesPtr = numTables;
|
||||
return tblinfo;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user