Re: ODBC Patch to deal with poor boolean handling.

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Aidan Mountford <Aidan(at)oz(dot)to>
Cc: "'pgsql-patches(at)postgresql(dot)org'" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: ODBC Patch to deal with poor boolean handling.
Date: 2001-09-06 16:14:26
Message-ID: 200109061614.f86GEQV29091@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


This has been applied and will appear in 7.2.

> 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"
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(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

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2001-09-06 16:30:48 Re: Patch for Improved Syntax Error Reporting
Previous Message Bruce Momjian 2001-09-06 15:58:26 Re: Patch for pl/tcl Tcl_ExternalToUtf and Tcl_UtfToExternal