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

Commit063216e

Browse files
committed
Allow psql booleans to use OFF or off.
Michael Paesold
1 parent8613eac commit063216e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/bin/psql/variables.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/variables.c,v 1.18 2004/08/29 04:13:03 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/variables.c,v 1.19 2004/10/15 05:02:31 momjian Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"common.h"
@@ -51,12 +51,12 @@ GetVariableBool(VariableSpace space, const char *name)
5151
val=GetVariable(space,name);
5252
if (val==NULL)
5353
return false;/* not set -> assume "off" */
54-
if (strcmp(val,"off")==0)
55-
return false;
54+
if (strcasecmp(val,"off")==0)
55+
return false;/* accept "off" or "OFF" as true */
5656

5757
/*
58-
* for backwards compatibility, anything except "off"is taken as
59-
* "true"
58+
* for backwards compatibility, anything except "off"or "OFF" is
59+
*taken as"true"
6060
*/
6161
return true;
6262
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp