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

Commit142a110

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 parent6cdc26e commit142a110

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
@@ -2444,7 +2444,8 @@ dumpDatabase(Archive *fout)
24442444
appendPQExpBufferStr(creaQry," LC_CTYPE = ");
24452445
appendStringLiteralAH(creaQry,ctype,fout);
24462446
}
2447-
if (strlen(tablespace)>0&&strcmp(tablespace,"pg_default")!=0)
2447+
if (strlen(tablespace)>0&&strcmp(tablespace,"pg_default")!=0&&
2448+
!dopt->outputNoTablespaces)
24482449
appendPQExpBuffer(creaQry," TABLESPACE = %s",
24492450
fmtId(tablespace));
24502451
appendPQExpBufferStr(creaQry,";\n");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp