aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/libpq/fe-connect.c')
-rw-r--r--src/interfaces/libpq/fe-connect.c8
1 files changed, 6 insertions, 2 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;