From: | Unprivileged user <nobody> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | General Bug Report: Libpq function PQfnumber does not handle case-insensitive comparisons correctly |
Date: | 1999-02-03 20:08:31 |
Message-ID: | 199902032008.PAA74166@hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================
Your name : Bahman Rafatjoo
Your email address : bahman(at)metrixsystems(dot)com
Category : runtime: front-end: C
Severity : non-critical
Summary: Libpq function PQfnumber does not handle case-insensitive comparisons correctly
System Configuration
--------------------
Operating System : Linux 2.0.34 ELF (Slackware)
PostgreSQL version : 6.4.2
Compiler used : gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)
Hardware:
---------
Pentium 32MB RAM
Linux brian 2.0.34 #5 Mon Jan 18 10:28:12 CET 1999 i586 unknown
Versions of other tools:
------------------------
GNU Make version 3.76.1
--------------------------------------------------------------------------
Problem Description:
--------------------
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.
--------------------------------------------------------------------------
Test Case:
----------
See below
--------------------------------------------------------------------------
Solution:
---------
In the file src/interfaces/libpq/fe-exec.c edit the code for the function
PQfnumber. In version 1.69.2.1 of this file (which is what I have), the line
to be modified is line 1525. It reads:
if (strcmp(field_name, res->attDescs[i].name) == 0)
and it should be:
if (strcmp(field_case, res->attDescs[i].name) == 0)
--------------------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-02-03 20:18:31 | Re: [BUGS] General Bug Report: Libpq function PQfnumber does not handle case-insensitive comparisons correctly |
Previous Message | Bruce Momjian | 1999-02-03 16:36:13 | Re: [BUGS] General Bug Report: regexp beginning of line doesn't work properly |