Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VS8ke-0007iI-La for pgsql-odbc@arkaria.postgresql.org; Fri, 04 Oct 2013 17:01:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VS8ke-0000DH-0a for pgsql-odbc@arkaria.postgresql.org; Fri, 04 Oct 2013 17:01:16 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VS8kd-0000DB-Ew for pgsql-odbc@postgresql.org; Fri, 04 Oct 2013 17:01:15 +0000 Received: from know-smtprelay-omc-6.server.virginmedia.net ([80.0.253.70]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VS8kZ-0006AD-Ro for pgsql-odbc@postgresql.org; Fri, 04 Oct 2013 17:01:14 +0000 Received: from [172.20.0.61] ([89.238.155.211]) by know-smtprelay-6-imp with bizsmtp id Z5191m00n4Zw9uZ01519nC; Fri, 04 Oct 2013 18:01:10 +0100 X-Originating-IP: [89.238.155.211] X-Spam: 0 X-Authority: v=2.0 cv=L+FF2Jv8 c=1 sm=1 a=2wT+DDxe7Ti/VK+5e5F3PQ==:17 a=fqZfJdc9ORcA:10 a=NRkdtqRyjfgA:10 a=uObrxnre4hsA:10 a=9YlaCzn6_68A:10 a=IkcTkHD0fZMA:10 a=NLZqzBF-AAAA:8 a=1E6KidTDeQcA:10 a=yMhMjlubAAAA:8 a=7klgDFOfiyN7BCcYx-wA:9 a=QEXdDO2ut3YA:10 a=REYN6dKmu0VxTam0:21 a=VeCMOstFZ-n4tNF-:21 a=2wT+DDxe7Ti/VK+5e5F3PQ==:117 Message-ID: <524EF455.6050409@ntlworld.com> Date: Fri, 04 Oct 2013 18:01:09 +0100 From: "Martin J. Evans" Reply-To: bohica@ntlworld.com User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: SQLGetTypeInfo does not return COLUMN_SIZE Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 2.1 (++) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org I may have discovered an issue with the postgres ODBC Driver. Postgres ODBC Driver version: perl -MDBI -le 'my $h = DBI->connect; print $h->get_info(7);' 09.00.0310 Platform: Linux, Ubuntu I maintain Perl DBD::ODBC and the test suite shows a problem because when calling SQLGetTypeInfo some types return 'CREATE_PARAMS' => 'max. length' but then the COLUMN_SIZE is missing. e.g.: $VAR1 = { 'UNSIGNED_ATTRIBUTE' => undef, 'MAXIMUM_SCALE' => undef, 'INTERVAL_PRECISION' => '0', 'CREATE_PARAMS' => 'max. length', 'NUM_PREC_RADIX' => undef, 'PRECISION' => 255, 'SEARCHABLE' => '3', 'MONEY' => '0', 'AUTO_INCREMENT' => undef, 'LOCAL_TYPE_NAME' => undef, 'LITERAL_PREFIX' => '\'', 'MINIMUM_SCALE' => undef, 'TYPE_NAME' => 'varchar', 'NULLABLE' => '1', 'DATA_TYPE' => 12, 'SQL_DATA_TYPE' => '12', 'LITERAL_SUFFIX' => '\'', 'CASE_SENSITIVE' => '1', 'SQL_DATETIME_SUB' => undef }; See http://msdn.microsoft.com/en-us/library/ms714632%28v=vs.85%29.aspx where COLUMN_SIZE was introduced in ODBC 2 (decades ago) and should exist in the columns returned. Without it, the application cannot know what to put in varchar (size_here) after a column in a create table. I've put in a special case for now to work around this problem but it issues a warning too. If you need anything further from me please let me know. Martin -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc