Re: segfault in SQLSpecialColumns when table name is null string

From: Lionel Elie Mamane <lionel(at)mamane(dot)lu>
To: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
Cc: Terrence Enger <tenger(at)iseries-guru(dot)com>, pgsql-odbc(at)postgresql(dot)org
Subject: Re: segfault in SQLSpecialColumns when table name is null string
Date: 2012-07-23 14:21:17
Message-ID: 20120723142117.GE10727@capsaicin.mamane.lu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

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

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message ranjeeth kumar 2012-08-02 07:25:23 Regarding PostgreSQL BIT datatype binding in ODBC.......
Previous Message Dave Cramer 2012-07-18 15:39:20 Re: question re org.postgresql.util.PSQLException