aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-exec.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1999-02-03 20:19:10 +0000
committerBruce Momjian <bruce@momjian.us>1999-02-03 20:19:10 +0000
commit3982368a4e2ae08659c1bd7536c91ec9c08a6139 (patch)
tree9edb23932d7c6e719bf9a3ce5454e2d35a6c6899 /src/interfaces/libpq/fe-exec.c
parent8d9237d48510464dc03e8b00e7203927dc07c4d4 (diff)
downloadpostgresql-3982368a4e2ae08659c1bd7536c91ec9c08a6139.tar.gz
postgresql-3982368a4e2ae08659c1bd7536c91ec9c08a6139.zip
The libpq function PQfnumber does not handle case-insensitive
comparisons correctly. The psql monitor converts all table and field names to lower case. If the PQfnumber function is called with a mixed case name, it will always return -1. Bahman Rafatjoo
Diffstat (limited to 'src/interfaces/libpq/fe-exec.c')
-rw-r--r--src/interfaces/libpq/fe-exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index 4e9b1530d37..e1d71bac488 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.71 1998/11/29 01:53:54 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.72 1999/02/03 20:19:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1650,7 +1650,7 @@ PQfnumber(PGresult *res, const char *field_name)
for (i = 0; i < res->numAttributes; i++)
{
- if (strcmp(field_name, res->attDescs[i].name) == 0)
+ if (strcmp(field_case, res->attDescs[i].name) == 0)
{
free(field_case);
return i;