Report BUG: The column size for BIT VARYING(5) type is incorrect

From: "James (Ke) Wang" <james(dot)wang(at)sas(dot)com>
To: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Report BUG: The column size for BIT VARYING(5) type is incorrect
Date: 2020-08-25 09:32:45
Message-ID: BYAPR05MB57208C6457F84D059F41E2B095570@BYAPR05MB5720.namprd05.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

l ODBC driver version
12.02.00.00

l PostgreSQL database version
PostgreSQL 11.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36), 64-bit

l Error message ( Log)
Successfully connected to DSN 'sbosmk'.
SQLExecDirect:
In: Statementhandle = 0x000000000060BD20, StatementText = "create table j_varbit2 (vbt1 bit varying (5))", Statementlength = 45
Return: SQL_SUCCESS=0
SQLPrepare:
In: StatementHandle = 0x000000000060BD20, StatementText = "select vbt1 from j_varbit2", TextLength = 26
Return: SQL_SUCCESS=0
SQLDescribeCol:
In:StatementHandle = 0x000000000060BD20, ColumnNumber = 1, ColumnName = 0x00000000001640D0, BufferLength = 600, NameLengthPtr = 0x0000000000104AA0, DataTypePtr = 0x000000000010DD30, ColumnSizePtr = 0x000000000010DD60, DecimalDigits = 0x000000000010DD90, NullablePtr = 0x000000000010DDC0
Return: SQL_SUCCESS=0
Out:*ColumnName = "vbt1", *NameLengthPtr = 4, *DataTypePtr = SQL_WVARCHAR=-9, *ColumnSizePtr = 1, *DecimalDigits = 0, *NullablePtr = SQL_NULLABLE=1
TST1011: Buffer ColumnName is not properly NULL terminated.

Note: Why is the *ColumnSizePtr = 1 instead of *ColumnSizePtr = 5 since the column is created with bit varying (5) in the test case?

Attachment Content-Type Size
mylog_odbct32w_2092.log application/octet-stream 4.7 KB

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Clemens Ladisch 2020-08-26 07:01:20 Re: Report BUG: The column size for BIT VARYING(5) type is incorrect
Previous Message Henrik Krohns 2020-08-24 14:41:31 Crashing with copy_and_convert_field