Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id B698423D696 for ; Mon, 23 Jul 2012 11:21:37 -0300 (ADT) Received: from capsaicin.mamane.lu ([2001:888:19f0:2:2e0:81ff:fe54:abf9]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1StJVt-00050c-2Q for pgsql-odbc@postgresql.org; Mon, 23 Jul 2012 14:21:35 +0000 Received: from master by capsaicin.mamane.lu with local (Exim 4.74) (envelope-from ) id 1StJVd-0004l1-Dk; Mon, 23 Jul 2012 16:21:17 +0200 Date: Mon, 23 Jul 2012 16:21:17 +0200 From: Lionel Elie Mamane To: Hiroshi Inoue Cc: Terrence Enger , pgsql-odbc@postgresql.org Subject: Re: segfault in SQLSpecialColumns when table name is null string Message-ID: <20120723142117.GE10727@capsaicin.mamane.lu> References: <1341922972.25065.19.camel@cougar-natty> <20120710142707.GB26793@capsaicin.mamane.lu> <5001E9A3.6070707@tpf.co.jp> <20120715050211.GA4207@capsaicin.mamane.lu> <5002E6D0.6090303@tpf.co.jp> <20120715164042.GA17624@capsaicin.mamane.lu> <50033057.2080408@tpf.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50033057.2080408@tpf.co.jp> X-Operating-System: GNU/Linux X-Request-PGP: http://www.mamane.lu/openpgp/rsa_v4_4096.asc User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201207/15 X-Sequence-Number: 10909 On Mon, Jul 16, 2012 at 06:04:23AM +0900, Hiroshi Inoue wrote: > (2012/07/16 1:40), Lionel Elie Mamane wrote: >> On Mon, Jul 16, 2012 at 12:50:40AM +0900, Hiroshi Inoue wrote: >>> (2012/07/15 14:02), Lionel Elie Mamane wrote: >>>> On Sun, Jul 15, 2012 at 06:50:27AM +0900, Hiroshi Inoue wrote: >>>>> (2012/07/10 23:27), Lionel Elie Mamane wrote: >>>>>> Also, the ultimate reason for this "strange thing" is that >>>>>> SQLColAttribute( (SQLHANDLE) 0x1ec7850, >>>>>> (SQLUSMALLINT) 1, >>>>>> (SQLUSMALLINT) 15, >>>>>> (SQLPOINTER) 0x1eb2640, >>>>>> 128, >>>>>> (SQLSMALLINT *) 0x7fffffff97de, >>>>>> NULL); >>>>>> where 15 == SQL_DESC_TABLE_NAME == SQL_COLUMN_TABLE_NAME >>>>>> returns (writes at 0x1eb2640) an empty string for this query: >>>>>> SELECT "Num" "Numero", "data" FROM "foo"."Table1" >>>>> What is your environment e.g. the version of your PG server >>>>> or the version of your psqlodbc? > Please set the following. > Protocol = 7.4 That is not among the choices offered by ODBCConfig; I can take 6.4, 6.3 or 6.2. Editing the ~/.odbc.ini file by hand, indeed it "solves" the issue. As does completely removing the "Protocol = ..." line. > Setting > UseServerSidePrepare = 1 > is also recommended. That is also not among the choices offered by ODBCConfig; I have the following boolean choices: ReadOnly RowVersioning ShowSystemTables ShowOidColumn FakeOidIndex I'm fairly sure ODBCConfig does not have these options (and possible values) hardcoded, but gets them by interrogating the driver (or rather its companion libodbcpsqlS.so?); 't would be a good idea to keep that in sync with what the actual driver supports. -- Lionel