@@ -79,12 +79,12 @@ TableInfo *
7979getSchemaData (int * numTablesPtr )
8080{
8181NamespaceInfo * nsinfo ;
82+ ExtensionInfo * extinfo ;
8283AggInfo * agginfo ;
8384InhInfo * inhinfo ;
8485RuleInfo * ruleinfo ;
8586ProcLangInfo * proclanginfo ;
8687CastInfo * castinfo ;
87- ExtensionInfo * extinfo ;
8888OpclassInfo * opcinfo ;
8989OpfamilyInfo * opfinfo ;
9090ConvInfo * convinfo ;
@@ -96,12 +96,12 @@ getSchemaData(int *numTablesPtr)
9696ForeignServerInfo * srvinfo ;
9797DefaultACLInfo * daclinfo ;
9898int numNamespaces ;
99+ int numExtensions ;
99100int numAggregates ;
100101int numInherits ;
101102int numRules ;
102103int numProcLangs ;
103104int numCasts ;
104- int numExtensions ;
105105int numOpclasses ;
106106int numOpfamilies ;
107107int numConversions ;
@@ -117,6 +117,10 @@ getSchemaData(int *numTablesPtr)
117117write_msg (NULL ,"reading schemas\n" );
118118nsinfo = getNamespaces (& numNamespaces );
119119
120+ if (g_verbose )
121+ write_msg (NULL ,"reading extensions\n" );
122+ extinfo = getExtensions (& numExtensions );
123+
120124if (g_verbose )
121125write_msg (NULL ,"reading user-defined functions\n" );
122126funinfo = getFuncs (& numFuncs );
@@ -146,6 +150,10 @@ getSchemaData(int *numTablesPtr)
146150write_msg (NULL ,"reading user-defined operator classes\n" );
147151opcinfo = getOpclasses (& numOpclasses );
148152
153+ if (g_verbose )
154+ write_msg (NULL ,"reading user-defined operator families\n" );
155+ opfinfo = getOpfamilies (& numOpfamilies );
156+
149157if (g_verbose )
150158write_msg (NULL ,"reading user-defined text search parsers\n" );
151159prsinfo = getTSParsers (& numTSParsers );
@@ -174,14 +182,14 @@ getSchemaData(int *numTablesPtr)
174182write_msg (NULL ,"reading default privileges\n" );
175183daclinfo = getDefaultACLs (& numDefaultACLs );
176184
177- if (g_verbose )
178- write_msg (NULL ,"reading user-defined operator families\n" );
179- opfinfo = getOpfamilies (& numOpfamilies );
180-
181185if (g_verbose )
182186write_msg (NULL ,"reading user-defined conversions\n" );
183187convinfo = getConversions (& numConversions );
184188
189+ if (g_verbose )
190+ write_msg (NULL ,"reading type casts\n" );
191+ castinfo = getCasts (& numCasts );
192+
185193if (g_verbose )
186194write_msg (NULL ,"reading user-defined tables\n" );
187195tblinfo = getTables (& numTables );
@@ -195,14 +203,14 @@ getSchemaData(int *numTablesPtr)
195203write_msg (NULL ,"reading rewrite rules\n" );
196204ruleinfo = getRules (& numRules );
197205
206+ /*
207+ * Identify extension member objects and mark them as not to be dumped.
208+ * This must happen after reading all objects that can be direct members
209+ * of extensions, but before we begin to process table subsidiary objects.
210+ */
198211if (g_verbose )
199- write_msg (NULL ,"reading type casts\n" );
200- castinfo = getCasts (& numCasts );
201-
202- /* this must be after getTables */
203- if (g_verbose )
204- write_msg (NULL ,"reading extensions\n" );
205- extinfo = getExtensions (& numExtensions );
212+ write_msg (NULL ,"finding extension members\n" );
213+ getExtensionMembership (extinfo ,numExtensions );
206214
207215/* Link tables to parents, mark parents of target tables interesting */
208216if (g_verbose )
@@ -525,9 +533,9 @@ findObjectByDumpId(DumpId dumpId)
525533 * Returns NULL for unknown ID
526534 *
527535 * We use binary search in a sorted list that is built on first call.
528- * If AssignDumpId() and findObjectByCatalogId() calls were intermixed,
536+ * If AssignDumpId() and findObjectByCatalogId() calls werefreely intermixed,
529537 * the code would work, but possibly be very slow.In the current usage
530- * pattern that does not happen, indeed weonly need to build the listonce .
538+ * pattern that does not happen, indeed we build the listat most twice .
531539 */
532540DumpableObject *
533541findObjectByCatalogId (CatalogId catalogId )