diff options
author | Bruce Momjian <bruce@momjian.us> | 2004-10-15 05:02:31 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2004-10-15 05:02:31 +0000 |
commit | 063216ef3dbc8a571d9f90c26be856c3eed205ec (patch) | |
tree | b7486f44b8f9853387509a3c06421170db4484ef /src | |
parent | 8613eac6c43749b0683500250ebecadf4b3c5dc0 (diff) | |
download | postgresql-063216ef3dbc8a571d9f90c26be856c3eed205ec.tar.gz postgresql-063216ef3dbc8a571d9f90c26be856c3eed205ec.zip |
Allow psql booleans to use OFF or off.
Michael Paesold
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/psql/variables.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/psql/variables.c b/src/bin/psql/variables.c index 2ba50b721da..b244a7fa1ee 100644 --- a/src/bin/psql/variables.c +++ b/src/bin/psql/variables.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2004, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/variables.c,v 1.18 2004/08/29 04:13:03 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/variables.c,v 1.19 2004/10/15 05:02:31 momjian Exp $ */ #include "postgres_fe.h" #include "common.h" @@ -51,12 +51,12 @@ GetVariableBool(VariableSpace space, const char *name) val = GetVariable(space, name); if (val == NULL) return false; /* not set -> assume "off" */ - if (strcmp(val, "off") == 0) - return false; + if (strcasecmp(val, "off") == 0) + return false; /* accept "off" or "OFF" as true */ /* - * for backwards compatibility, anything except "off" is taken as - * "true" + * for backwards compatibility, anything except "off" or "OFF" is + * taken as "true" */ return true; } |