8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.48 2000/12/03 20:45:37 tgl Exp $
11
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.49 2001/01/12 15:41:29 pjw Exp $
12
12
*
13
13
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
14
14
*
@@ -270,12 +270,14 @@ dumpSchema(Archive *fout,
270
270
int numInherits ;
271
271
int numAggregates ;
272
272
int numOperators ;
273
+ int numIndices ;
273
274
TypeInfo * tinfo = NULL ;
274
275
FuncInfo * finfo = NULL ;
275
276
AggInfo * agginfo = NULL ;
276
277
TableInfo * tblinfo = NULL ;
277
278
InhInfo * inhinfo = NULL ;
278
279
OprInfo * oprinfo = NULL ;
280
+ IndInfo * indinfo = NULL ;
279
281
280
282
if (g_verbose )
281
283
fprintf (stderr , "%s reading user-defined types %s\n" ,
@@ -302,6 +304,11 @@ dumpSchema(Archive *fout,
302
304
g_comment_start , g_comment_end );
303
305
tblinfo = getTables (& numTables , finfo , numFuncs );
304
306
307
+ if (g_verbose )
308
+ fprintf (stderr , "%s reading indices information %s\n" ,
309
+ g_comment_start , g_comment_end );
310
+ indinfo = getIndices (& numIndices );
311
+
305
312
if (g_verbose )
306
313
fprintf (stderr , "%s reading table inheritance information %s\n" ,
307
314
g_comment_start , g_comment_end );
@@ -336,9 +343,18 @@ dumpSchema(Archive *fout,
336
343
if (g_verbose )
337
344
fprintf (stderr , "%s dumping out tables %s\n" ,
338
345
g_comment_start , g_comment_end );
339
- dumpTables (fout , tblinfo , numTables , inhinfo , numInherits ,
346
+
347
+ dumpTables (fout , tblinfo , numTables , indinfo , numIndices , inhinfo , numInherits ,
340
348
tinfo , numTypes , tablename , aclsSkip , oids , schemaOnly , dataOnly );
341
349
350
+ if (fout && !dataOnly )
351
+ {
352
+ if (g_verbose )
353
+ fprintf (stderr , "%s dumping out indices %s\n" ,
354
+ g_comment_start , g_comment_end );
355
+ dumpIndices (fout , indinfo , numIndices , tblinfo , numTables , tablename );
356
+ }
357
+
342
358
if (!tablename && !dataOnly )
343
359
{
344
360
if (g_verbose )
@@ -377,35 +393,8 @@ dumpSchema(Archive *fout,
377
393
clearTypeInfo (tinfo , numTypes );
378
394
clearFuncInfo (finfo , numFuncs );
379
395
clearInhInfo (inhinfo , numInherits );
380
- return tblinfo ;
381
- }
382
-
383
- /*
384
- * dumpSchemaIdx:
385
- * dump indexes at the end for performance
386
- *
387
- */
388
-
389
- extern void
390
- dumpSchemaIdx (Archive * fout , const char * tablename ,
391
- TableInfo * tblinfo , int numTables )
392
- {
393
- int numIndices ;
394
- IndInfo * indinfo ;
395
-
396
- if (g_verbose )
397
- fprintf (stderr , "%s reading indices information %s\n" ,
398
- g_comment_start , g_comment_end );
399
- indinfo = getIndices (& numIndices );
400
-
401
- if (fout )
402
- {
403
- if (g_verbose )
404
- fprintf (stderr , "%s dumping out indices %s\n" ,
405
- g_comment_start , g_comment_end );
406
- dumpIndices (fout , indinfo , numIndices , tblinfo , numTables , tablename );
407
- }
408
396
clearIndInfo (indinfo , numIndices );
397
+ return tblinfo ;
409
398
}
410
399
411
400
/* flagInhAttrs -
0 commit comments