From: Clemens Ladisch <clemens@ladisch.de>
To: pgsql-odbc@lists.postgresql.org
Subject: Re: Report BUG: The column size for BIT VARYING(5) type is incorrect
Date: Wed, 26 Aug 2020 09:01:20 +0200
Message-ID: <5b781d8a-1384-32be-1fbf-4e9c184e0467@ladisch.de> (raw)
In-Reply-To: <BYAPR05MB57208C6457F84D059F41E2B095570@BYAPR05MB5720.namprd05.prod.outlook.com>
References: <BYAPR05MB57208C6457F84D059F41E2B095570@BYAPR05MB5720.namprd05.prod.outlook.com>
James (Ke) Wang wrote:
> create table j_varbit2 (vbt1 bit varying (5))
>
> *ColumnName = "vbt1", *NameLengthPtr = 4, *DataTypePtr = SQL_WVARCHAR=-9, *ColumnSizePtr = 1, *DecimalDigits = 0, *NullablePtr = SQL_NULLABLE=1
>
> Why is the *ColumnSizePtr = 1 instead of *ColumnSizePtr = 5 since the column is created with bit varying (5) in the test case?
The ODBC specification does not define the data type BIT VARYING, so the
ODBC driver tries to represent it as a blob or text.
And five bits fit into one byte.
Regards,
Clemens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: clemens@ladisch.de
Subject: Re: Report BUG: The column size for BIT VARYING(5) type is incorrect
In-Reply-To: <5b781d8a-1384-32be-1fbf-4e9c184e0467@ladisch.de>
References: <BYAPR05MB57208C6457F84D059F41E2B095570@BYAPR05MB5720.namprd05.prod.outlook.com> <5b781d8a-1384-32be-1fbf-4e9c184e0467@ladisch.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox