Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite97e9c5

Browse files
committed
Don't print database's tablespace in pg_dump -C --no-tablespaces output.
If the database has a non-default tablespace, we emitted a TABLESPACEclause in the CREATE DATABASE command emitted by -C, even if--no-tablespaces was also specified. This seems wrong, and it'sinconsistent with what pg_dumpall does, so change it. Per bug #14315from Danylo Hlynskyi.Back-patch to 9.5. The bug is much older, but it'd be a more invasivechange before 9.5 because dumpDatabase() hasn't got an easy way to getto the outputNoTablespaces flag. Doesn't seem worth the work giventhe lack of previous complaints.Report: <20160908081953.1402.75347@wrigleys.postgresql.org>
1 parent67c6bd1 commite97e9c5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2552,7 +2552,8 @@ dumpDatabase(Archive *fout)
25522552
appendPQExpBufferStr(creaQry, " LC_CTYPE = ");
25532553
appendStringLiteralAH(creaQry, ctype, fout);
25542554
}
2555-
if (strlen(tablespace) > 0 && strcmp(tablespace, "pg_default") != 0)
2555+
if (strlen(tablespace) > 0 && strcmp(tablespace, "pg_default") != 0 &&
2556+
!dopt->outputNoTablespaces)
25562557
appendPQExpBuffer(creaQry, " TABLESPACE = %s",
25572558
fmtId(tablespace));
25582559
appendPQExpBufferStr(creaQry, ";\n");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp