diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/parser/scan.l | 7 | ||||
-rw-r--r-- | src/bin/psql/command.c | 6 | ||||
-rw-r--r-- | src/interfaces/libpq/fe-connect.c | 21 |
3 files changed, 10 insertions, 24 deletions
diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l index 83afeb7a418..090f5911db3 100644 --- a/src/backend/parser/scan.l +++ b/src/backend/parser/scan.l @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.61 2000/01/20 05:26:53 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.62 2000/01/23 01:27:35 petere Exp $ * *------------------------------------------------------------------------- */ @@ -338,8 +338,11 @@ other . isupper(yytext[i])) yytext[i] = tolower(yytext[i]); if (i >= NAMEDATALEN) + { + elog(NOTICE, "identifier \"%s\" will be truncated to \"%.*s\"", + yytext, NAMEDATALEN-1, yytext); yytext[NAMEDATALEN-1] = '\0'; - + } keyword = ScanKeywordLookup((char*)yytext); if (keyword != NULL) { return keyword->value; diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 333da8cbc93..a12d311b2e0 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Team * - * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.14 2000/01/22 14:20:51 petere Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.15 2000/01/23 01:27:37 petere Exp $ */ #include <c.h> #include "command.h" @@ -1198,6 +1198,7 @@ process_file(char *filename) { FILE *fd; int result; + char *oldfilename; if (!filename) return false; @@ -1214,10 +1215,11 @@ process_file(char *filename) return false; } + oldfilename = pset.inputfile; pset.inputfile = filename; result = MainLoop(fd); fclose(fd); - pset.inputfile = NULL; + pset.inputfile = oldfilename; return (result == EXIT_SUCCESS); } diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index a444e5bd7a8..6cfe06e3d19 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.113 2000/01/18 19:05:31 momjian Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.114 2000/01/23 01:27:39 petere Exp $ * *------------------------------------------------------------------------- */ @@ -467,25 +467,6 @@ PQsetdbLogin(const char *pghost, const char *pgport, const char *pgoptions, else conn->dbName = strdup(dbName); - if (conn->dbName) - { - - /* - * if the database name is surrounded by double-quotes, then don't - * convert case - */ - if (*conn->dbName == '"') - { - strcpy(conn->dbName, conn->dbName + 1); - conn->dbName[strlen(conn->dbName) - 1] = '\0'; - } - else - for (i = 0; conn->dbName[i]; i++) - if (isascii((unsigned char) conn->dbName[i]) && - isupper(conn->dbName[i])) - conn->dbName[i] = tolower(conn->dbName[i]); - } - if (error) { conn->status = CONNECTION_BAD; |