From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | bahman(at)metrixsystems(dot)com |
Cc: | pgsql-bugs(at)postgreSQL(dot)org |
Subject: | Re: [BUGS] General Bug Report: Libpq function PQfnumber does not handle case-insensitive comparisons correctly |
Date: | 1999-02-03 20:18:31 |
Message-ID: | 199902032019.PAA14242@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Very nice. Fix applied.
>
> ============================================================================
> 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)
>
>
>
>
> --------------------------------------------------------------------------
>
>
>
--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 1999-02-04 00:57:49 | Re: [BUGS] General Bug Report: regexp beginning of line doesn't work properly |
Previous Message | Unprivileged user | 1999-02-03 20:08:31 | General Bug Report: Libpq function PQfnumber does not handle case-insensitive comparisons correctly |