@@ -76,7 +76,7 @@ static intstrInArray(const char *pattern, char **arr, int arr_size);
7676 * Collect information about all potentially dumpable objects
7777 */
7878TableInfo *
79- getSchemaData (int * numTablesPtr )
79+ getSchemaData (Archive * fout , int * numTablesPtr )
8080{
8181ExtensionInfo * extinfo ;
8282InhInfo * inhinfo ;
@@ -101,7 +101,7 @@ getSchemaData(int *numTablesPtr)
101101
102102if (g_verbose )
103103write_msg (NULL ,"reading schemas\n" );
104- getNamespaces (& numNamespaces );
104+ getNamespaces (fout , & numNamespaces );
105105
106106/*
107107 * getTables should be done as soon as possible, so as to minimize the
@@ -111,94 +111,94 @@ getSchemaData(int *numTablesPtr)
111111 */
112112if (g_verbose )
113113write_msg (NULL ,"reading user-defined tables\n" );
114- tblinfo = getTables (& numTables );
114+ tblinfo = getTables (fout , & numTables );
115115tblinfoindex = buildIndexArray (tblinfo ,numTables ,sizeof (TableInfo ));
116116
117117if (g_verbose )
118118write_msg (NULL ,"reading extensions\n" );
119- extinfo = getExtensions (& numExtensions );
119+ extinfo = getExtensions (fout , & numExtensions );
120120
121121if (g_verbose )
122122write_msg (NULL ,"reading user-defined functions\n" );
123- funinfo = getFuncs (& numFuncs );
123+ funinfo = getFuncs (fout , & numFuncs );
124124funinfoindex = buildIndexArray (funinfo ,numFuncs ,sizeof (FuncInfo ));
125125
126126/* this must be after getTables and getFuncs */
127127if (g_verbose )
128128write_msg (NULL ,"reading user-defined types\n" );
129- typinfo = getTypes (& numTypes );
129+ typinfo = getTypes (fout , & numTypes );
130130typinfoindex = buildIndexArray (typinfo ,numTypes ,sizeof (TypeInfo ));
131131
132132/* this must be after getFuncs, too */
133133if (g_verbose )
134134write_msg (NULL ,"reading procedural languages\n" );
135- getProcLangs (& numProcLangs );
135+ getProcLangs (fout , & numProcLangs );
136136
137137if (g_verbose )
138138write_msg (NULL ,"reading user-defined aggregate functions\n" );
139- getAggregates (& numAggregates );
139+ getAggregates (fout , & numAggregates );
140140
141141if (g_verbose )
142142write_msg (NULL ,"reading user-defined operators\n" );
143- oprinfo = getOperators (& numOperators );
143+ oprinfo = getOperators (fout , & numOperators );
144144oprinfoindex = buildIndexArray (oprinfo ,numOperators ,sizeof (OprInfo ));
145145
146146if (g_verbose )
147147write_msg (NULL ,"reading user-defined operator classes\n" );
148- getOpclasses (& numOpclasses );
148+ getOpclasses (fout , & numOpclasses );
149149
150150if (g_verbose )
151151write_msg (NULL ,"reading user-defined operator families\n" );
152- getOpfamilies (& numOpfamilies );
152+ getOpfamilies (fout , & numOpfamilies );
153153
154154if (g_verbose )
155155write_msg (NULL ,"reading user-defined text search parsers\n" );
156- getTSParsers (& numTSParsers );
156+ getTSParsers (fout , & numTSParsers );
157157
158158if (g_verbose )
159159write_msg (NULL ,"reading user-defined text search templates\n" );
160- getTSTemplates (& numTSTemplates );
160+ getTSTemplates (fout , & numTSTemplates );
161161
162162if (g_verbose )
163163write_msg (NULL ,"reading user-defined text search dictionaries\n" );
164- getTSDictionaries (& numTSDicts );
164+ getTSDictionaries (fout , & numTSDicts );
165165
166166if (g_verbose )
167167write_msg (NULL ,"reading user-defined text search configurations\n" );
168- getTSConfigurations (& numTSConfigs );
168+ getTSConfigurations (fout , & numTSConfigs );
169169
170170if (g_verbose )
171171write_msg (NULL ,"reading user-defined foreign-data wrappers\n" );
172- getForeignDataWrappers (& numForeignDataWrappers );
172+ getForeignDataWrappers (fout , & numForeignDataWrappers );
173173
174174if (g_verbose )
175175write_msg (NULL ,"reading user-defined foreign servers\n" );
176- getForeignServers (& numForeignServers );
176+ getForeignServers (fout , & numForeignServers );
177177
178178if (g_verbose )
179179write_msg (NULL ,"reading default privileges\n" );
180- getDefaultACLs (& numDefaultACLs );
180+ getDefaultACLs (fout , & numDefaultACLs );
181181
182182if (g_verbose )
183183write_msg (NULL ,"reading user-defined collations\n" );
184- collinfo = getCollations (& numCollations );
184+ collinfo = getCollations (fout , & numCollations );
185185collinfoindex = buildIndexArray (collinfo ,numCollations ,sizeof (CollInfo ));
186186
187187if (g_verbose )
188188write_msg (NULL ,"reading user-defined conversions\n" );
189- getConversions (& numConversions );
189+ getConversions (fout , & numConversions );
190190
191191if (g_verbose )
192192write_msg (NULL ,"reading type casts\n" );
193- getCasts (& numCasts );
193+ getCasts (fout , & numCasts );
194194
195195if (g_verbose )
196196write_msg (NULL ,"reading table inheritance information\n" );
197- inhinfo = getInherits (& numInherits );
197+ inhinfo = getInherits (fout , & numInherits );
198198
199199if (g_verbose )
200200write_msg (NULL ,"reading rewrite rules\n" );
201- getRules (& numRules );
201+ getRules (fout , & numRules );
202202
203203/*
204204 * Identify extension member objects and mark them as not to be dumped.
@@ -207,7 +207,7 @@ getSchemaData(int *numTablesPtr)
207207 */
208208if (g_verbose )
209209write_msg (NULL ,"finding extension members\n" );
210- getExtensionMembership (extinfo ,numExtensions );
210+ getExtensionMembership (fout , extinfo ,numExtensions );
211211
212212/* Link tables to parents, mark parents of target tables interesting */
213213if (g_verbose )
@@ -216,23 +216,23 @@ getSchemaData(int *numTablesPtr)
216216
217217if (g_verbose )
218218write_msg (NULL ,"reading column info for interesting tables\n" );
219- getTableAttrs (tblinfo ,numTables );
219+ getTableAttrs (fout , tblinfo ,numTables );
220220
221221if (g_verbose )
222222write_msg (NULL ,"flagging inherited columns in subtables\n" );
223223flagInhAttrs (tblinfo ,numTables );
224224
225225if (g_verbose )
226226write_msg (NULL ,"reading indexes\n" );
227- getIndexes (tblinfo ,numTables );
227+ getIndexes (fout , tblinfo ,numTables );
228228
229229if (g_verbose )
230230write_msg (NULL ,"reading constraints\n" );
231- getConstraints (tblinfo ,numTables );
231+ getConstraints (fout , tblinfo ,numTables );
232232
233233if (g_verbose )
234234write_msg (NULL ,"reading triggers\n" );
235- getTriggers (tblinfo ,numTables );
235+ getTriggers (fout , tblinfo ,numTables );
236236
237237* numTablesPtr = numTables ;
238238return tblinfo ;