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
This commit is contained in:
Bruce Momjian 1999-02-03 20:19:10 +00:00
parent 8d9237d485
commit 3982368a4e
1 changed files with 2 additions and 2 deletions

View File

@ -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;