@@ -76,7 +76,7 @@ static int strInArray(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{
8181 ExtensionInfo * extinfo ;
8282 InhInfo * inhinfo ;
@@ -101,7 +101,7 @@ getSchemaData(int *numTablesPtr)
101101
102102 if (g_verbose )
103103 write_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 */
112112 if (g_verbose )
113113 write_msg (NULL , "reading user-defined tables\n" );
114- tblinfo = getTables (& numTables );
114+ tblinfo = getTables (fout , & numTables );
115115 tblinfoindex = buildIndexArray (tblinfo , numTables , sizeof (TableInfo ));
116116
117117 if (g_verbose )
118118 write_msg (NULL , "reading extensions\n" );
119- extinfo = getExtensions (& numExtensions );
119+ extinfo = getExtensions (fout , & numExtensions );
120120
121121 if (g_verbose )
122122 write_msg (NULL , "reading user-defined functions\n" );
123- funinfo = getFuncs (& numFuncs );
123+ funinfo = getFuncs (fout , & numFuncs );
124124 funinfoindex = buildIndexArray (funinfo , numFuncs , sizeof (FuncInfo ));
125125
126126 /* this must be after getTables and getFuncs */
127127 if (g_verbose )
128128 write_msg (NULL , "reading user-defined types\n" );
129- typinfo = getTypes (& numTypes );
129+ typinfo = getTypes (fout , & numTypes );
130130 typinfoindex = buildIndexArray (typinfo , numTypes , sizeof (TypeInfo ));
131131
132132 /* this must be after getFuncs, too */
133133 if (g_verbose )
134134 write_msg (NULL , "reading procedural languages\n" );
135- getProcLangs (& numProcLangs );
135+ getProcLangs (fout , & numProcLangs );
136136
137137 if (g_verbose )
138138 write_msg (NULL , "reading user-defined aggregate functions\n" );
139- getAggregates (& numAggregates );
139+ getAggregates (fout , & numAggregates );
140140
141141 if (g_verbose )
142142 write_msg (NULL , "reading user-defined operators\n" );
143- oprinfo = getOperators (& numOperators );
143+ oprinfo = getOperators (fout , & numOperators );
144144 oprinfoindex = buildIndexArray (oprinfo , numOperators , sizeof (OprInfo ));
145145
146146 if (g_verbose )
147147 write_msg (NULL , "reading user-defined operator classes\n" );
148- getOpclasses (& numOpclasses );
148+ getOpclasses (fout , & numOpclasses );
149149
150150 if (g_verbose )
151151 write_msg (NULL , "reading user-defined operator families\n" );
152- getOpfamilies (& numOpfamilies );
152+ getOpfamilies (fout , & numOpfamilies );
153153
154154 if (g_verbose )
155155 write_msg (NULL , "reading user-defined text search parsers\n" );
156- getTSParsers (& numTSParsers );
156+ getTSParsers (fout , & numTSParsers );
157157
158158 if (g_verbose )
159159 write_msg (NULL , "reading user-defined text search templates\n" );
160- getTSTemplates (& numTSTemplates );
160+ getTSTemplates (fout , & numTSTemplates );
161161
162162 if (g_verbose )
163163 write_msg (NULL , "reading user-defined text search dictionaries\n" );
164- getTSDictionaries (& numTSDicts );
164+ getTSDictionaries (fout , & numTSDicts );
165165
166166 if (g_verbose )
167167 write_msg (NULL , "reading user-defined text search configurations\n" );
168- getTSConfigurations (& numTSConfigs );
168+ getTSConfigurations (fout , & numTSConfigs );
169169
170170 if (g_verbose )
171171 write_msg (NULL , "reading user-defined foreign-data wrappers\n" );
172- getForeignDataWrappers (& numForeignDataWrappers );
172+ getForeignDataWrappers (fout , & numForeignDataWrappers );
173173
174174 if (g_verbose )
175175 write_msg (NULL , "reading user-defined foreign servers\n" );
176- getForeignServers (& numForeignServers );
176+ getForeignServers (fout , & numForeignServers );
177177
178178 if (g_verbose )
179179 write_msg (NULL , "reading default privileges\n" );
180- getDefaultACLs (& numDefaultACLs );
180+ getDefaultACLs (fout , & numDefaultACLs );
181181
182182 if (g_verbose )
183183 write_msg (NULL , "reading user-defined collations\n" );
184- collinfo = getCollations (& numCollations );
184+ collinfo = getCollations (fout , & numCollations );
185185 collinfoindex = buildIndexArray (collinfo , numCollations , sizeof (CollInfo ));
186186
187187 if (g_verbose )
188188 write_msg (NULL , "reading user-defined conversions\n" );
189- getConversions (& numConversions );
189+ getConversions (fout , & numConversions );
190190
191191 if (g_verbose )
192192 write_msg (NULL , "reading type casts\n" );
193- getCasts (& numCasts );
193+ getCasts (fout , & numCasts );
194194
195195 if (g_verbose )
196196 write_msg (NULL , "reading table inheritance information\n" );
197- inhinfo = getInherits (& numInherits );
197+ inhinfo = getInherits (fout , & numInherits );
198198
199199 if (g_verbose )
200200 write_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 */
208208 if (g_verbose )
209209 write_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 */
213213 if (g_verbose )
@@ -216,23 +216,23 @@ getSchemaData(int *numTablesPtr)
216216
217217 if (g_verbose )
218218 write_msg (NULL , "reading column info for interesting tables\n" );
219- getTableAttrs (tblinfo , numTables );
219+ getTableAttrs (fout , tblinfo , numTables );
220220
221221 if (g_verbose )
222222 write_msg (NULL , "flagging inherited columns in subtables\n" );
223223 flagInhAttrs (tblinfo , numTables );
224224
225225 if (g_verbose )
226226 write_msg (NULL , "reading indexes\n" );
227- getIndexes (tblinfo , numTables );
227+ getIndexes (fout , tblinfo , numTables );
228228
229229 if (g_verbose )
230230 write_msg (NULL , "reading constraints\n" );
231- getConstraints (tblinfo , numTables );
231+ getConstraints (fout , tblinfo , numTables );
232232
233233 if (g_verbose )
234234 write_msg (NULL , "reading triggers\n" );
235- getTriggers (tblinfo , numTables );
235+ getTriggers (fout , tblinfo , numTables );
236236
237237 * numTablesPtr = numTables ;
238238 return tblinfo ;
0 commit comments