From: | Aidan Mountford <Aidan(at)oz(dot)to> |
---|---|
To: | "'pgsql-patches(at)postgresql(dot)org'" <pgsql-patches(at)postgresql(dot)org> |
Subject: | ODBC Patch to deal with poor boolean handling. |
Date: | 2001-08-01 06:58:30 |
Message-ID: | B08465D85C11D41199720040053101D50F3E87@DEVELOPMENT1 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
The following patch (against 7.1.2) rectifies an issue relating to handling
of booleans.
Was first noticed when using pgAdmin -- The first booleans in the first row
of a query result
were always false...
Some more digging found that it broke a few of our other products.
Testing has shown booleans to return correctly unconditionally now :)
Cheers for making a great product...
Aidan
cvs diff convert.c (in directory C:\CVS-POSTGRES\pgsql\src\interfaces\odbc\)
Index: convert.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/convert.c,v
retrieving revision 1.44
diff -r1.44 convert.c
295c295,308
< if (s[0] == 'T' || s[0] == 't')
---
> /* Aidan Mountford (aidan(at)oz(dot)to) 1/08/2001:
>
> >> if (s[0] == 'T' || s[0] == 't')
<<< This wont work...
>
> Quick Hack ...
> If 2 consecutive calls are placed to
FETCH_FIRST,
> the first time will report correctly
(Because s[0] = 't')
> s[0] is then set to '1'...
> The second time s[0] = 1 and it gets
set to '0'...
> Not too friendly :)
> */
>
>
> if (s[0] == 'T' || s[0] == 't' || s[0] ==
'1')
.....................................................
. Cisco Certified Network Associate
. Microsoft Certified Professional
. 3Com 3Wizard
.
. Technical Director
. MindVision Interactive Pty. Ltd.
. http://www.mindvision.com.au
. PH: +61-8-8212-9544
. FAX: +61-8-8212-9644
. 48 Light Square
. Adelaide SA
. AUSTRALIA 5000
.....................................................
"Remember, There is always scope for things to be worse"
From | Date | Subject | |
---|---|---|---|
Next Message | Aidan Mountford | 2001-08-01 13:59:51 | ODBC Boolean handling |
Previous Message | Aidan Mountford | 2001-08-01 06:36:21 | ODBC Patch to deal with poor boolean handling. |