diff options
author | Bruce Momjian <bruce@momjian.us> | 1997-05-20 03:39:02 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1997-05-20 03:39:02 +0000 |
commit | a1157deb57c7e654d6fb19c98b04ebd974152aab (patch) | |
tree | 4cf2c66ba981917c479125ac293d0077db3fb705 /src/interfaces | |
parent | 9860926148af07890e0ad1c1f04a93945919b51d (diff) | |
download | postgresql-a1157deb57c7e654d6fb19c98b04ebd974152aab.tar.gz postgresql-a1157deb57c7e654d6fb19c98b04ebd974152aab.zip |
Added fcvt() prot for bsdi.
Made PQsetdb() and PQfnumber() case-insensitive.
Removed attempt to set table ownership via pg_dumpall.
Diffstat (limited to 'src/interfaces')
-rw-r--r-- | src/interfaces/libpq/fe-connect.c | 8 | ||||
-rw-r--r-- | src/interfaces/libpq/fe-exec.c | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index 5309a37b19a..c19ed020160 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.34 1997/05/13 01:46:00 momjian Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.35 1997/05/20 03:38:49 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -303,7 +303,8 @@ PQsetdb(const char *pghost, const char* pgport, const char* pgoptions, const cha /* An error message from some service we call. */ bool error; /* We encountered an error that prevents successful completion */ - + int i; + conn = (PGconn*)malloc(sizeof(PGconn)); if (conn == NULL) @@ -375,6 +376,9 @@ PQsetdb(const char *pghost, const char* pgport, const char* pgoptions, const cha ((tmp = getenv("PGDATABASE")))) { conn->dbName = strdup(tmp); } else conn->dbName = strdup(conn->pguser); + for(i = 0; conn->dbName[i]; i++) + if (isupper(conn->dbName[i])) + conn->dbName[i] = tolower(conn->dbName[i]); } else conn->dbName = NULL; if (error) conn->status = CONNECTION_BAD; diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c index 5e92e4a63d2..65197c2fe4f 100644 --- a/src/interfaces/libpq/fe-exec.c +++ b/src/interfaces/libpq/fe-exec.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.28 1997/01/24 17:47:33 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.29 1997/05/20 03:39:02 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1471,7 +1471,7 @@ PQfnumber(PGresult *res, const char* field_name) return -1; for (i=0;i<res->numAttributes;i++) { - if ( strcmp(field_name, res->attDescs[i].name) == 0 ) + if ( strcasecmp(field_name, res->attDescs[i].name) == 0 ) return i; } return -1; @@ -1629,4 +1629,4 @@ PQgetisnull(PGresult *res, int tup_num, int field_num) return 1; else return 0; - } +} |