Re: Access bool integer solution - Mailing list pgsql-general

From Richard Huxton
Subject Re: Access bool integer solution
Date
Msg-id 43A679E3.2030703@archonet.com
Whole thread Raw
In response to Access bool integer solution  (Sim Zacks <sim@compulab.co.il>)
Responses Re: Access bool integer solution
List pgsql-general
Sim Zacks wrote:
> I've been having problems with bools in my Access frontend and
> PostGreSQL backend. The problem is that Access uses -1 for true and 0
> for false and when it does a select it uses those numbers instead of the
> true or false values. PostGreSQL does not have an implicit conversion
> from int to bool, so it was failing was with an error "Operator does not
> exist: boolean=integer"
> I got around this in my queries by using the cbool function, which
> passed in the actual true or false values. This solution did not work
> for internal filters, because it internally calls the select statement
> and does not give an interface to the code.

Are you sure there isn't a setting in the ODBC driver to handle this?

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: "Marian Naghen"
Date:
Subject: Re: sequences in transaction blocks
Next
From: "Marian Naghen"
Date:
Subject: sequences w/o holes