Missing meta data information for bit and bit varying - Mailing list pgsql-odbc

From Walter Couto
Subject Missing meta data information for bit and bit varying
Date
Msg-id 7FA4F9E5512F214C801E596ECD8790E066A8499F@ETNAMAIL01.embarcadero.com
Whole thread Raw
Responses Re: Missing meta data information for bit and bit varying  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-odbc

Have a table similar to the one below:

 

CREATE TABLE bitstring_test

(

    test           integer          NOT NULL,

    bit_col        bit(47),

    bitvarying_col bit varying(47),

    PRIMARY KEY (test)

)

 

You can before a select * from the table above and observe what information is given back to you by the ODBC driver for the bit and bit varying colums:

 

1)      Both bit_col and bitvarying_col return “unknown” for the type name (SQLColAttribute using SQL_DESC_TYPE_NAME).  This appears to be due to the fact that in pgtypes.c the method pgtype_attr_to_name is missing the case for PG_TYPE_BIT and is missing the #define and case for bit varying(1562).

2)      For bit_col, calls to SQLColAttribute passing either SQL_DESC_LENGTH or SQL_DESC_DISPLAY_SIZE both return the value 255. Which is not what the size is stated above but at least it is bigger J.

3)      For bitvarying_col, calls to SQLColAttribute passing either SQL_DESC_LENGTH or SQL_DESC_DISPLAY_SIZE return the value 43.  Which is not correct and smaller than what is stated above so this can cause problems. L

 

Any idea if I there is a way for me to avoid problem 3) as I can’t tell from the type name what I am looking at.

 

Walter Couto

 


CONFIDENTIALITY NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.   ­­  

pgsql-odbc by date:

Previous
From: Chris Wilkins
Date:
Subject: Re: Need new psqlODBC release to update OpenSSL again
Next
From: Heikki Linnakangas
Date:
Subject: Re: Problem retrieving a numeric(38,0) value as SQL_NUMERIC_STRUCT if value needs to use all 16 SQLCHAR elements of the val array