|
15 | 15 | * |
16 | 16 | * |
17 | 17 | * IDENTIFICATION |
18 | | - *$PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.151 2007/11/24 20:26:49 tgl Exp $ |
| 18 | + *$PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.152 2008/01/14 19:27:41 tgl Exp $ |
19 | 19 | * |
20 | 20 | *------------------------------------------------------------------------- |
21 | 21 | */ |
@@ -2528,11 +2528,17 @@ _printTocEntry(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt, bool isDat |
2528 | 2528 | /* |
2529 | 2529 | * Avoid dumping the public schema, as it will already be created ... |
2530 | 2530 | * unless we are using --clean mode, in which case it's been deleted and |
2531 | | - * we'd better recreate it. |
| 2531 | + * we'd better recreate it. Likewise for its comment, if any. |
2532 | 2532 | */ |
2533 | | -if (!ropt->dropSchema&& |
2534 | | -strcmp(te->desc,"SCHEMA")==0&&strcmp(te->tag,"public")==0) |
2535 | | -return; |
| 2533 | +if (!ropt->dropSchema) |
| 2534 | +{ |
| 2535 | +if (strcmp(te->desc,"SCHEMA")==0&& |
| 2536 | +strcmp(te->tag,"public")==0) |
| 2537 | +return; |
| 2538 | +if (strcmp(te->desc,"COMMENT")==0&& |
| 2539 | +strcmp(te->tag,"SCHEMA public")==0) |
| 2540 | +return; |
| 2541 | +} |
2536 | 2542 |
|
2537 | 2543 | /* Select owner, schema, and tablespace as necessary */ |
2538 | 2544 | _becomeOwner(AH,te); |
|