Re: Bools as char not providing expected result - Mailing list pgsql-odbc

From Dave Cramer
Subject Re: Bools as char not providing expected result
Date
Msg-id CADK3HHKfAxoqjP7LH4Dk9cJW-J_Avb8f=RbCVYEUpFpeaqfj+g@mail.gmail.com
Whole thread Raw
In response to Bools as char not providing expected result  (Abhishek Kumar <abhishek.aak0@gmail.com>)
Responses Re: Bools as char not providing expected result
List pgsql-odbc
HI Abhishek,


Thanks,
Dave Cramer
www.postgres.rocks


On Tue, 30 Jul 2024 at 05:56, Abhishek Kumar <abhishek.aak0@gmail.com> wrote:
Hi,

I am working on an ODBC linux CPP application using the psqlodbc driver.

I am passing "bools_as_char=0;"  when i do a SQLDriverConnect. Below is the full connection string

"HostName=localhost;PORT=5432;Database=postgres;UID=postgres;PWD=postgres;bools_as_char=0;DRIVER=PostgreSQLNative;"


According to my understanding, bool_as_char is set to 1 by default in psqlodbc code. I am trying to override that to 0 such that i get the boolean treated as a SQL_BIT with precision 1. However, the driver is still returning SQL_VARCHAR and precision as 5(PG_WIDTH_OF_BOOLS_AS_CHAR in the psqlodbc code). 


Can you please help here?


Regards,

Abhishek

pgsql-odbc by date:

Previous
From: Abhishek Kumar
Date:
Subject: Bools as char not providing expected result
Next
From: Abhishek Kumar
Date:
Subject: Re: Bools as char not providing expected result