Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WKqLN-0001Ea-L7 for pgsql-odbc@arkaria.postgresql.org; Tue, 04 Mar 2014 14:29:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WKqLN-0001gs-5F for pgsql-odbc@arkaria.postgresql.org; Tue, 04 Mar 2014 14:29:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WKqLM-0001gl-MM for pgsql-odbc@postgresql.org; Tue, 04 Mar 2014 14:29:16 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WKqLJ-0001mA-La for pgsql-odbc@postgresql.org; Tue, 04 Mar 2014 14:29:16 +0000 Received: from sc9-mailhost1.vmware.com (sc9-mailhost1.vmware.com [10.113.161.71]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id E29EA28391; Tue, 4 Mar 2014 06:29:12 -0800 (PST) Received: from zcs-prod-ext-mta-2.vmware.com (zcs-prod-ext-mta-2.vmware.com [10.113.62.224]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id DDF6B183D1; Tue, 4 Mar 2014 06:29:12 -0800 (PST) Received: from zcs-prod-ext-mta-2.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTP id 9FB93C005D; Tue, 4 Mar 2014 06:29:10 -0800 (PST) Received: from [192.168.1.90] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTPSA; Tue, 4 Mar 2014 06:29:09 -0800 (PST) Message-ID: <5315E336.40603@vmware.com> Date: Tue, 04 Mar 2014 16:29:10 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 MIME-Version: 1.0 To: bohica@ntlworld.com CC: pgsql-odbc@postgresql.org Subject: Re: SQLGetTypeInfo does not return COLUMN_SIZE References: <524EF455.6050409@ntlworld.com> In-Reply-To: <524EF455.6050409@ntlworld.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -6.9 (------) 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 (sorry for the late reply, I'm spring-cleaning my inbox..) On 10/04/2013 08:01 PM, Martin J. Evans wrote: > 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. It's there with the old name "PRECISION". That Microsoft page says that: "The following columns have been renamed for ODBC 3.x. The column name changes do not affect backward compatibility because applications bind by column number." So technically, I think the driver is not doing anything wrong when it's returning the old name, although I agree it would be about time to switch to the new names... - Heikki -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc