Replace useless strcasecmp's by strcmp's.

This commit is contained in:
Peter Eisentraut 2001-09-19 09:48:42 +00:00
parent 4a4abd4232
commit 3baf7400d9
2 changed files with 28 additions and 28 deletions

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.63 2001/08/16 20:38:53 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.64 2001/09/19 09:48:42 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -737,17 +737,17 @@ init_params(CreateSeqStmt *seq, Form_pg_sequence new)
{ {
DefElem *defel = (DefElem *) lfirst(option); DefElem *defel = (DefElem *) lfirst(option);
if (!strcasecmp(defel->defname, "increment")) if (strcmp(defel->defname, "increment")==0)
increment_by = defel; increment_by = defel;
else if (!strcasecmp(defel->defname, "start")) else if (strcmp(defel->defname, "start")==0)
last_value = defel; last_value = defel;
else if (!strcasecmp(defel->defname, "maxvalue")) else if (strcmp(defel->defname, "maxvalue")==0)
max_value = defel; max_value = defel;
else if (!strcasecmp(defel->defname, "minvalue")) else if (strcmp(defel->defname, "minvalue")==0)
min_value = defel; min_value = defel;
else if (!strcasecmp(defel->defname, "cache")) else if (strcmp(defel->defname, "cache")==0)
cache_value = defel; cache_value = defel;
else if (!strcasecmp(defel->defname, "cycle")) else if (strcmp(defel->defname, "cycle")==0)
{ {
if (defel->arg != (Node *) NULL) if (defel->arg != (Node *) NULL)
elog(ERROR, "DefineSequence: CYCLE ??"); elog(ERROR, "DefineSequence: CYCLE ??");

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.83 2001/09/08 15:24:00 petere Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.84 2001/09/19 09:48:42 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -220,38 +220,38 @@ CreateUser(CreateUserStmt *stmt)
{ {
DefElem *defel = (DefElem *) lfirst(option); DefElem *defel = (DefElem *) lfirst(option);
if (strcasecmp(defel->defname, "password") == 0 || if (strcmp(defel->defname, "password") == 0 ||
strcasecmp(defel->defname, "encryptedPassword") == 0 || strcmp(defel->defname, "encryptedPassword") == 0 ||
strcasecmp(defel->defname, "unencryptedPassword") == 0) { strcmp(defel->defname, "unencryptedPassword") == 0) {
if (dpassword) if (dpassword)
elog(ERROR, "CREATE USER: conflicting options"); elog(ERROR, "CREATE USER: conflicting options");
dpassword = defel; dpassword = defel;
if (strcasecmp(defel->defname, "encryptedPassword") == 0) if (strcmp(defel->defname, "encryptedPassword") == 0)
encrypt_password = true; encrypt_password = true;
else if (strcasecmp(defel->defname, "unencryptedPassword") == 0) else if (strcmp(defel->defname, "unencryptedPassword") == 0)
encrypt_password = false; encrypt_password = false;
} }
else if (strcasecmp(defel->defname, "sysid") == 0) { else if (strcmp(defel->defname, "sysid") == 0) {
if (dsysid) if (dsysid)
elog(ERROR, "CREATE USER: conflicting options"); elog(ERROR, "CREATE USER: conflicting options");
dsysid = defel; dsysid = defel;
} }
else if (strcasecmp(defel->defname, "createdb") == 0) { else if (strcmp(defel->defname, "createdb") == 0) {
if (dcreatedb) if (dcreatedb)
elog(ERROR, "CREATE USER: conflicting options"); elog(ERROR, "CREATE USER: conflicting options");
dcreatedb = defel; dcreatedb = defel;
} }
else if (strcasecmp(defel->defname, "createuser") == 0) { else if (strcmp(defel->defname, "createuser") == 0) {
if (dcreateuser) if (dcreateuser)
elog(ERROR, "CREATE USER: conflicting options"); elog(ERROR, "CREATE USER: conflicting options");
dcreateuser = defel; dcreateuser = defel;
} }
else if (strcasecmp(defel->defname, "groupElts") == 0) { else if (strcmp(defel->defname, "groupElts") == 0) {
if (dgroupElts) if (dgroupElts)
elog(ERROR, "CREATE USER: conflicting options"); elog(ERROR, "CREATE USER: conflicting options");
dgroupElts = defel; dgroupElts = defel;
} }
else if (strcasecmp(defel->defname, "validUntil") == 0) { else if (strcmp(defel->defname, "validUntil") == 0) {
if (dvalidUntil) if (dvalidUntil)
elog(ERROR, "CREATE USER: conflicting options"); elog(ERROR, "CREATE USER: conflicting options");
dvalidUntil = defel; dvalidUntil = defel;
@ -455,28 +455,28 @@ AlterUser(AlterUserStmt *stmt)
{ {
DefElem *defel = (DefElem *) lfirst(option); DefElem *defel = (DefElem *) lfirst(option);
if (strcasecmp(defel->defname, "password") == 0 || if (strcmp(defel->defname, "password") == 0 ||
strcasecmp(defel->defname, "encryptedPassword") == 0 || strcmp(defel->defname, "encryptedPassword") == 0 ||
strcasecmp(defel->defname, "unencryptedPassword") == 0) { strcmp(defel->defname, "unencryptedPassword") == 0) {
if (dpassword) if (dpassword)
elog(ERROR, "ALTER USER: conflicting options"); elog(ERROR, "ALTER USER: conflicting options");
dpassword = defel; dpassword = defel;
if (strcasecmp(defel->defname, "encryptedPassword") == 0) if (strcmp(defel->defname, "encryptedPassword") == 0)
encrypt_password = true; encrypt_password = true;
else if (strcasecmp(defel->defname, "unencryptedPassword") == 0) else if (strcmp(defel->defname, "unencryptedPassword") == 0)
encrypt_password = false; encrypt_password = false;
} }
else if (strcasecmp(defel->defname, "createdb") == 0) { else if (strcmp(defel->defname, "createdb") == 0) {
if (dcreatedb) if (dcreatedb)
elog(ERROR, "ALTER USER: conflicting options"); elog(ERROR, "ALTER USER: conflicting options");
dcreatedb = defel; dcreatedb = defel;
} }
else if (strcasecmp(defel->defname, "createuser") == 0) { else if (strcmp(defel->defname, "createuser") == 0) {
if (dcreateuser) if (dcreateuser)
elog(ERROR, "ALTER USER: conflicting options"); elog(ERROR, "ALTER USER: conflicting options");
dcreateuser = defel; dcreateuser = defel;
} }
else if (strcasecmp(defel->defname, "validUntil") == 0) { else if (strcmp(defel->defname, "validUntil") == 0) {
if (dvalidUntil) if (dvalidUntil)
elog(ERROR, "ALTER USER: conflicting options"); elog(ERROR, "ALTER USER: conflicting options");
dvalidUntil = defel; dvalidUntil = defel;
@ -849,12 +849,12 @@ CreateGroup(CreateGroupStmt *stmt)
{ {
DefElem *defel = (DefElem *) lfirst(option); DefElem *defel = (DefElem *) lfirst(option);
if (strcasecmp(defel->defname, "sysid") == 0) { if (strcmp(defel->defname, "sysid") == 0) {
if (dsysid) if (dsysid)
elog(ERROR, "CREATE GROUP: conflicting options"); elog(ERROR, "CREATE GROUP: conflicting options");
dsysid = defel; dsysid = defel;
} }
else if (strcasecmp(defel->defname, "userElts") == 0) { else if (strcmp(defel->defname, "userElts") == 0) {
if (duserElts) if (duserElts)
elog(ERROR, "CREATE GROUP: conflicting options"); elog(ERROR, "CREATE GROUP: conflicting options");
duserElts = defel; duserElts = defel;