mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-27 08:39:28 +08:00
Fix obviously-utterly-untested noTocComments code.
This commit is contained in:
parent
64cb889106
commit
c7040429e7
@ -15,7 +15,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.95 2004/08/29 05:06:53 momjian Exp $
|
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.96 2004/08/30 19:44:14 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -2357,8 +2357,6 @@ _getObjectFromDropStmt(const char *dropStmt, const char *type)
|
|||||||
static void
|
static void
|
||||||
_printTocEntry(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt, bool isData, bool acl_pass)
|
_printTocEntry(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt, bool isData, bool acl_pass)
|
||||||
{
|
{
|
||||||
const char *pfx;
|
|
||||||
|
|
||||||
/* ACLs are dumped only during acl pass */
|
/* ACLs are dumped only during acl pass */
|
||||||
if (acl_pass)
|
if (acl_pass)
|
||||||
{
|
{
|
||||||
@ -2371,9 +2369,6 @@ _printTocEntry(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt, bool isDat
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AH->noTocComments)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Avoid dumping the public schema, as it will already be created ...
|
* Avoid dumping the public schema, as it will already be created ...
|
||||||
* unless we are using --clean mode, in which case it's been deleted
|
* unless we are using --clean mode, in which case it's been deleted
|
||||||
@ -2392,6 +2387,10 @@ _printTocEntry(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt, bool isDat
|
|||||||
_setWithOids(AH, te);
|
_setWithOids(AH, te);
|
||||||
|
|
||||||
/* Emit header comment for item */
|
/* Emit header comment for item */
|
||||||
|
if (!AH->noTocComments)
|
||||||
|
{
|
||||||
|
const char *pfx;
|
||||||
|
|
||||||
if (isData)
|
if (isData)
|
||||||
pfx = "Data for ";
|
pfx = "Data for ";
|
||||||
else
|
else
|
||||||
@ -2419,6 +2418,7 @@ _printTocEntry(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt, bool isDat
|
|||||||
if (AH->PrintExtraTocPtr != NULL)
|
if (AH->PrintExtraTocPtr != NULL)
|
||||||
(*AH->PrintExtraTocPtr) (AH, te);
|
(*AH->PrintExtraTocPtr) (AH, te);
|
||||||
ahprintf(AH, "--\n\n");
|
ahprintf(AH, "--\n\n");
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actually print the definition.
|
* Actually print the definition.
|
||||||
|
Loading…
Reference in New Issue
Block a user