[ psqlodbc-Bugs-1010731 ] Incorrect info for varchar(255), text columns

From: <noreply(at)pgfoundry(dot)org>
To: noreply(at)pgfoundry(dot)org
Subject: [ psqlodbc-Bugs-1010731 ] Incorrect info for varchar(255), text columns
Date: 2009-11-18 20:55:43
Message-ID: 20091118205543.431961072085@pgfoundry.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Bugs item #1010731, was opened at 2009-11-18 15:55
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1010731&group_id=1000125

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Farid Zidan (faridz)
Assigned to: Nobody (None)
Summary: Incorrect info for varchar(255), text columns

Initial Comment:
PostgreSQL ANSI ODBC driver 8.04.01 returns incorrect info for
SQLColAttribute SQL_DESC_TYPE and/or SQL_DESC_OCTET_LENGTH

Example,
create table test_varchar(col1 varchar(20), col2 varchar(255), col3 text);

I get the following information from SQLColAttribute:
column SQL_DESC_TYPE SQL_DESC_OCTET_LENGTH
col1 SQL_VARCHAR 20
col2 SQL_LONGVARCHAR 255
col3 SQL_LONGVARCHAR 8190

col1 info is correct.
col2 SQL_DESC_TYPE should be SQL_VARCHAR not SQL_LONGVARCHAR.
col3 SQL_DESC_OCTET_LENGTH should be something large such as 2147483647 (2**31 -1)

Attached is screenshot of the Firebird vs PostgreSQL ODBC driver results for the test table above (MS SQL Server ODBC driver returns the same info as the Firebird ODBC driver)

----------------------------------------------------------------------

You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1010731&group_id=1000125

Browse pgsql-odbc by date

  From Date Subject
Next Message noreply 2009-11-18 21:03:48 [ psqlodbc-Bugs-1010397 ] SQLForeignKeys no rows returned
Previous Message Hiroshi Inoue 2009-11-18 13:44:36 Re: odbc driver leaks memory when connection failed