15
15
*
16
16
*
17
17
* IDENTIFICATION
18
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.95 2004/08/29 05:06:53 momjian Exp $
18
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.96 2004/08/30 19:44:14 tgl Exp $
19
19
*
20
20
*-------------------------------------------------------------------------
21
21
*/
@@ -2357,8 +2357,6 @@ _getObjectFromDropStmt(const char *dropStmt, const char *type)
2357
2357
static void
2358
2358
_printTocEntry (ArchiveHandle * AH , TocEntry * te , RestoreOptions * ropt , bool isData , bool acl_pass )
2359
2359
{
2360
- const char * pfx ;
2361
-
2362
2360
/* ACLs are dumped only during acl pass */
2363
2361
if (acl_pass )
2364
2362
{
@@ -2371,9 +2369,6 @@ _printTocEntry(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt, bool isDat
2371
2369
return ;
2372
2370
}
2373
2371
2374
- if (AH -> noTocComments )
2375
- return ;
2376
-
2377
2372
/*
2378
2373
* Avoid dumping the public schema, as it will already be created ...
2379
2374
* unless we are using --clean mode, in which case it's been deleted
@@ -2392,33 +2387,38 @@ _printTocEntry(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt, bool isDat
2392
2387
_setWithOids (AH , te );
2393
2388
2394
2389
/* Emit header comment for item */
2395
- if (isData )
2396
- pfx = "Data for " ;
2397
- else
2398
- pfx = "" ;
2399
-
2400
- ahprintf (AH , "--\n" );
2401
- if (AH -> public .verbose )
2390
+ if (!AH -> noTocComments )
2402
2391
{
2403
- ahprintf (AH , "-- TOC entry %d (class %u OID %u)\n" ,
2404
- te -> dumpId , te -> catalogId .tableoid , te -> catalogId .oid );
2405
- if (te -> nDeps > 0 )
2392
+ const char * pfx ;
2393
+
2394
+ if (isData )
2395
+ pfx = "Data for " ;
2396
+ else
2397
+ pfx = "" ;
2398
+
2399
+ ahprintf (AH , "--\n" );
2400
+ if (AH -> public .verbose )
2406
2401
{
2407
- int i ;
2402
+ ahprintf (AH , "-- TOC entry %d (class %u OID %u)\n" ,
2403
+ te -> dumpId , te -> catalogId .tableoid , te -> catalogId .oid );
2404
+ if (te -> nDeps > 0 )
2405
+ {
2406
+ int i ;
2408
2407
2409
- ahprintf (AH , "-- Dependencies:" );
2410
- for (i = 0 ; i < te -> nDeps ; i ++ )
2411
- ahprintf (AH , " %d" , te -> dependencies [i ]);
2412
- ahprintf (AH , "\n" );
2408
+ ahprintf (AH , "-- Dependencies:" );
2409
+ for (i = 0 ; i < te -> nDeps ; i ++ )
2410
+ ahprintf (AH , " %d" , te -> dependencies [i ]);
2411
+ ahprintf (AH , "\n" );
2412
+ }
2413
2413
}
2414
+ ahprintf (AH , "-- %sName: %s; Type: %s; Schema: %s; Owner: %s\n" ,
2415
+ pfx , te -> tag , te -> desc ,
2416
+ te -> namespace ? te -> namespace : "-" ,
2417
+ te -> owner );
2418
+ if (AH -> PrintExtraTocPtr != NULL )
2419
+ (* AH -> PrintExtraTocPtr ) (AH , te );
2420
+ ahprintf (AH , "--\n\n" );
2414
2421
}
2415
- ahprintf (AH , "-- %sName: %s; Type: %s; Schema: %s; Owner: %s\n" ,
2416
- pfx , te -> tag , te -> desc ,
2417
- te -> namespace ? te -> namespace : "-" ,
2418
- te -> owner );
2419
- if (AH -> PrintExtraTocPtr != NULL )
2420
- (* AH -> PrintExtraTocPtr ) (AH , te );
2421
- ahprintf (AH , "--\n\n" );
2422
2422
2423
2423
/*
2424
2424
* Actually print the definition.
0 commit comments