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

Commitccdeed7

Browse files
committed
Fix incorrect SQL syntax emitted when -E is given without -P.
Report and fix from Martin Pitt.
1 parent5390e28 commitccdeed7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/bin/scripts/createuser.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
66
* Portions Copyright (c) 1994, Regents of the University of California
77
*
8-
* $PostgreSQL: pgsql/src/bin/scripts/createuser.c,v 1.8 2004/01/01 19:27:15 tgl Exp $
8+
* $PostgreSQL: pgsql/src/bin/scripts/createuser.c,v 1.9 2004/01/09 00:15:11 tgl Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -189,12 +189,12 @@ main(int argc, char *argv[])
189189
printfPQExpBuffer(&sql,"CREATE USER %s",fmtId(newuser));
190190
if (sysid)
191191
appendPQExpBuffer(&sql," SYSID %s",sysid);
192-
if (encrypted==+1)
193-
appendPQExpBuffer(&sql," ENCRYPTED");
194-
if (encrypted==-1)
195-
appendPQExpBuffer(&sql," UNENCRYPTED");
196192
if (newpassword)
197193
{
194+
if (encrypted==+1)
195+
appendPQExpBuffer(&sql," ENCRYPTED");
196+
if (encrypted==-1)
197+
appendPQExpBuffer(&sql," UNENCRYPTED");
198198
appendPQExpBuffer(&sql," PASSWORD ");
199199
appendStringLiteral(&sql,newpassword, false);
200200
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp