pg_dump: suppress "Tablespace:" comment for default tablespaces
authorBruce Momjian <bruce@momjian.us>
Mon, 11 May 2015 15:45:43 +0000 (11:45 -0400)
committerBruce Momjian <bruce@momjian.us>
Mon, 11 May 2015 15:45:43 +0000 (11:45 -0400)
Report by Hans Ginzel

src/bin/pg_dump/pg_backup_archiver.c

index ca427de7ae931ee5b052aa8efe6422f9c96c82af..f9b564eee41a0a9421611d9a38c8a5044b366052 100644 (file)
@@ -3246,7 +3246,7 @@ _printTocEntry(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt, bool isDat
        free(sanitized_schema);
        free(sanitized_owner);
 
-       if (te->tablespace && !ropt->noTablespace)
+       if (te->tablespace && strlen(te->tablespace) > 0 && !ropt->noTablespace)
        {
            char       *sanitized_tablespace;