Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 1C07E6321AE for ; Wed, 18 Nov 2009 17:21:38 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 16806-08 for ; Wed, 18 Nov 2009 21:21:29 +0000 (UTC) Received: from pgfoundry.org (pgfoundry.org [200.46.204.130]) by mail.postgresql.org (Postfix) with ESMTP id 02B4A636845 for ; Wed, 18 Nov 2009 17:21:28 -0400 (AST) Received: from localhost (maia-1.hub.org [200.46.208.211]) by pgfoundry.org (Postfix) with ESMTP id CBBBD1072154 for ; Wed, 18 Nov 2009 21:21:26 +0000 (UTC) Received: from pgfoundry.org ([200.46.204.130]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 12937-07; Wed, 18 Nov 2009 21:21:10 +0000 (UTC) Received: by pgfoundry.org (Postfix, from userid 80) id 45C8B1072088; Wed, 18 Nov 2009 21:21:14 +0000 (UTC) To: noreply@pgfoundry.org From: Subject: [ psqlodbc-Bugs-1010731 ] Incorrect info for varchar(255), text columns Content-type: text/plain; charset=UTF-8 Message-Id: <20091118212114.45C8B1072088@pgfoundry.org> Date: Wed, 18 Nov 2009 21:21:14 +0000 (UTC) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.74 tagged_above=-10 required=5 tests=BAYES_20=-0.74 X-Spam-Level: X-Archive-Number: 200911/27 X-Sequence-Number: 10076 Bugs item #1010731, was opened at 2009-11-18 20: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) ---------------------------------------------------------------------- Comment By: Richard Broersma (rabroersma) Date: 2009-11-18 21:21 Message: I have one thought that might be unrelated to your problem: Notice the ODBC driver setting for Max LongVarChar. http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/~checkout~/psqlodbc/psqlodbc/docs/config.html?rev=1.10&content-type=text/html I wonder if the ODBC driver is masking the actual size that a TEXT column could be? ---------------------------------------------------------------------- You can respond by visiting: http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1010731&group_id=1000125