Re: segfault in SQLSpecialColumns when table name is null string - Mailing list pgsql-odbc

From Hiroshi Inoue
Subject Re: segfault in SQLSpecialColumns when table name is null string
Date
Msg-id 5001E9A3.6070707@tpf.co.jp
Whole thread Raw
In response to Re: segfault in SQLSpecialColumns when table name is null string  (Lionel Elie Mamane <lionel@mamane.lu>)
Responses Re: segfault in SQLSpecialColumns when table name is null string
List pgsql-odbc
Hi、

(2012/07/10 23:27), Lionel Elie Mamane wrote:
> On Tue, Jul 10, 2012 at 08:22:52AM -0400, Terrence Enger wrote:
>
>> Working with PostgreSQL version 8.4.12-0ubuntu11.04 and with ODBC
>> driver versions 1:08.03.0200-1.2 (supplied with ubuntu-natty (11.04))
>> and pgsqlodbc-09.01.0100 (built locally), I have managed to provoke a
>> segfault by calling SQLSpecialColumns with a null string for the table
>> name.  This call is, of course, a strange thing to do, and I cannot
>> imagine any good result.  Still, a segfault seems a disproportionate
>> punishment for doing something silly.
>
> 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?

regards,
Hiroshi Inoue


pgsql-odbc by date:

Previous
From: Nelson Manuel Marques
Date:
Subject: Questions regarding versioning
Next
From: Lionel Elie Mamane
Date:
Subject: Re: segfault in SQLSpecialColumns when table name is null string