possible odbc driver bug with postgresql-7.4

Lists: pgsql-odbc
From: Caio Begotti <caio(at)ueberalles(dot)net>
To: pgsql-odbc(at)postgresql(dot)org
Subject: possible odbc driver bug with postgresql-7.4
Date: 2006-12-12 11:42:20
Message-ID: 2D198CAE-6B07-4BF0-A1CA-7E651A9BBD8C@ueberalles.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

Hello list, I've contacted Peter Eisentraut (the current Debian
maintainer of odbc-postgresql) and now I'm sending to you the same
message I've sent to him. I hope you guys have any clue regarding
this not-confirmed-bug...

> To: petere(at)debian(dot)org
> Subject: possible odbc driver bug with postgresql-7.4
>
> Hi, I'm contacting you before the actual ODBC driver maintainers
> 'cause maybe you can have an idea about it.
>
> Please read http://bugs.digium.com/view.php?id=8513 for more
> details (it's related to using the ODBC driver you do maintain do
> connect PGSQL-7.4 with the Asterisk PBX packages from Debian).
> We've been unable to get SQLGetData to work with chunking and the
> code is just pulling the OID of the blog, and not the actual blob...

I've tried to change my data field type from oid to lo but it didn't
work.
I've tried using the ODBC connector with PGSQL-8.1 as well, and it
didn't work.

Manually exporting the large object using lo_export works, so there's
something recorded there.
Inserting in the database works as well, but getting the data back
out does not.

Please let me know how I could make sure it's indeed a ODBC problem
or SELECT/INSERT issue and how I could provide to you more useful
information to track this problem and close it as soo as we can :-)

PS: the version of every package involved in this issue came from
Debian Etch, which is now frozen for release

Cheers and thank you guys in advance!

--
caio[1982] begotti
http://caio.ueberalles.net


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Caio Begotti <caio(at)ueberalles(dot)net>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: possible odbc driver bug with postgresql-7.4
Date: 2006-12-12 17:11:11
Message-ID: 4699.1165943471@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

Caio Begotti <caio(at)ueberalles(dot)net> writes:
>> We've been unable to get SQLGetData to work with chunking and the
>> code is just pulling the OID of the blog, and not the actual blob...

Is that supposed to work? I can't see the whole code, just the proposed
patch to change the chunk size on-the-fly (which seems completely
useless for such a small chunk size) ... but what it looks like is that
it's just selecting the OID column value.

If you expect a read of the column to deliver a lot of bytes then you
should be using bytea not large objects, I would think.

regards, tom lane


From: Caio Begotti <caio(at)ueberalles(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: possible odbc driver bug with postgresql-7.4
Date: 2006-12-12 17:30:20
Message-ID: 1C34D1CC-0DAA-4ED3-9122-CC97DB3DEB2B@ueberalles.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

On 12/12/2006, at 15:11, Tom Lane wrote:
> If you expect a read of the column to deliver a lot of bytes then you
> should be using bytea not large objects, I would think.

Talking to blitzrage, another reporter of this issue, minutes ago:

[15:26:24] blitzrage: its not the field type that is the issue -- its
how the current implementation pulls the data from the DB afaict
[15:26:47] blitzrage: the data is in the DB, but right now, the
implementation just pulls the OID out of the DB, not the blob
[15:27:09] blitzrage: I tried all binary types -- that's not the issue

He refused to join this list, so I believe I can at least quote him
to help to solve the problem :)

Cheers,

--
caio[1982] begotti
http://caio.ueberalles.net


From: Caio Begotti <caio(at)ueberalles(dot)net>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: possible odbc driver bug with postgresql-7.4
Date: 2006-12-13 00:03:05
Message-ID: 9E2FED95-E172-4954-A317-66915DAD7644@ueberalles.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

On 12/12/2006, at 15:30, Caio Begotti wrote:
> [15:26:24] blitzrage: its not the field type that is the issue --
> its how the current implementation pulls the data from the DB afaict
> [15:26:47] blitzrage: the data is in the DB, but right now, the
> implementation just pulls the OID out of the DB, not the blob

Tonight the Asterisk.org developers will roll a new release without
this bug fixed and they "said" that's up to me, and other people
affected, to find a way out and clean solution. Please, is there
anything I can try to make sure it's not a fault of your ODBC
connector for PostgreSQL?

Regards,

--
caio[1982] begotti
http://caio.ueberalles.net


From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: Caio Begotti <caio(at)ueberalles(dot)net>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: possible odbc driver bug with postgresql-7.4
Date: 2006-12-13 03:33:35
Message-ID: 457F748F.80401@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

Caio Begotti wrote:
> Hello list, I've contacted Peter Eisentraut (the current Debian
> maintainer of odbc-postgresql) and now I'm sending to you the same
> message I've sent to him. I hope you guys have any clue regarding this
> not-confirmed-bug...
>
>> To: petere(at)debian(dot)org
>> Subject: possible odbc driver bug with postgresql-7.4
>>
>> Hi, I'm contacting you before the actual ODBC driver maintainers
>> 'cause maybe you can have an idea about it.
>>
>> Please read http://bugs.digium.com/view.php?id=8513 for more details
>> (it's related to using the ODBC driver you do maintain do connect
>> PGSQL-7.4 with the Asterisk PBX packages from Debian). We've been
>> unable to get SQLGetData to work with chunking and the code is just
>> pulling the OID of the blog, and not the actual blob...
>
> I've tried to change my data field type from oid to lo but it didn't work.

How do you define the type lo ?
What is the version of the psqlodbc driver ?

ragards,
Hiroshi Inoue


From: Caio Begotti <caio(at)ueberalles(dot)net>
To: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: possible odbc driver bug with postgresql-7.4
Date: 2006-12-13 03:40:09
Message-ID: 9428F310-3DB0-402D-9CA8-0E85B2FE047C@ueberalles.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

On 13/12/2006, at 01:33, Hiroshi Inoue wrote:
> How do you define the type lo ?

http://bugs.digium.com/file_download.php?file_id=12467&type=bug
This file has the structure I use to create the table (I just tried
to change oid to lo, yeah).

> What is the version of the psqlodbc driver ?

PGSQL-7.4 using odbc-postgresql version 08.01.0200.

Thanks for the attention, Hiroshi!

--
caio[1982] begotti
http://caio.ueberalles.net


From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: Caio Begotti <caio(at)ueberalles(dot)net>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: possible odbc driver bug with postgresql-7.4
Date: 2006-12-13 03:57:29
Message-ID: 457F7A29.8080706@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

Caio Begotti wrote:
> On 13/12/2006, at 01:33, Hiroshi Inoue wrote:
>> How do you define the type lo ?
>
> http://bugs.digium.com/file_download.php?file_id=12467&type=bug
> This file has the structure I use to create the table (I just tried to
> change oid to lo, yeah).

Psqlodbc driver has never been able to handle large objects without the use
of type lo. Is type lo already defined in your environment ?

>> What is the version of the psqlodbc driver ?
>
> PGSQL-7.4 using odbc-postgresql version 08.01.0200.

Unfortunately I'm unfamilar with the version.
I don't know if there's a plan to upgrade the driver version.

regards,
Hiroshi Inoue


From: Caio Begotti <caio(at)ueberalles(dot)net>
To: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: possible odbc driver bug with postgresql-7.4
Date: 2006-12-13 04:05:46
Message-ID: C503EFCE-4BB8-4AF2-8182-6A286CE8567E@ueberalles.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

On 13/12/2006, at 01:57, Hiroshi Inoue wrote:
> Psqlodbc driver has never been able to handle large objects without
> the use
> of type lo. Is type lo already defined in your environment ?

I didn't know that was needed to use large objects, Hiroshi.
Do you mind to point some doc/URL to me about how to do that?

Cheers,

--
caio[1982] begotti
http://caio.ueberalles.net


From: "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
To: "Caio Begotti" <caio(at)ueberalles(dot)net>, "Hiroshi Inoue" <inoue(at)tpf(dot)co(dot)jp>
Cc: <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: possible odbc driver bug with postgresql-7.4
Date: 2006-12-13 04:43:49
Message-ID: 04d201c71e71$4878ea10$3043040a@wiseknot.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

From: "Caio Begotti"

> On 13/12/2006, at 01:57, Hiroshi Inoue wrote:
>> Psqlodbc driver has never been able to handle large objects without
>> the use
>> of type lo. Is type lo already defined in your environment ?
>
> I didn't know that was needed to use large objects, Hiroshi.
> Do you mind to point some doc/URL to me about how to do that?

Our document was put on the seen correct place.
http://psqlodbc.projects.postgresql.org/
Please visit here.:-)

Thanks!

Regards,
Hiroshi Saito


From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: Caio Begotti <caio(at)ueberalles(dot)net>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: possible odbc driver bug with postgresql-7.4
Date: 2006-12-13 05:45:24
Message-ID: 457F9374.8090505@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

Caio Begotti wrote:
> On 13/12/2006, at 01:57, Hiroshi Inoue wrote:
>> Psqlodbc driver has never been able to handle large objects without
>> the use
>> of type lo. Is type lo already defined in your environment ?
>
> I didn't know that was needed to use large objects, Hiroshi.
> Do you mind to point some doc/URL to me about how to do that?

The old version (< 8.2) of drivers can't handle the domain type lo.
You would have to define the type using contrib/lo.
Could you find contrib/lo in your package ?

regards,
Hiroshi Inoue


From: Ludek Finstrle <luf(at)pzkagis(dot)cz>
To: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: possible odbc driver bug with postgresql-7.4
Date: 2006-12-13 07:34:06
Message-ID: 20061213073406.GA18621@soptik.pzkagis.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

> >>What is the version of the psqlodbc driver ?
> >
> >PGSQL-7.4 using odbc-postgresql version 08.01.0200.
>
> Unfortunately I'm unfamilar with the version.
> I don't know if there's a plan to upgrade the driver version.

There is no such plan. I want help with HEAD development but I have
no time right now.

Regards,

Luf


From: Caio Begotti <caio(at)ueberalles(dot)net>
To: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: possible odbc driver bug with postgresql-7.4
Date: 2006-12-14 18:22:21
Message-ID: E2DEE1CF-4024-493A-A5AC-3EEEE7070CB7@ueberalles.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

On 13/12/2006, at 03:45, Hiroshi Inoue wrote:dle the domain type lo.
> You would have to define the type using contrib/lo.
> Could you find contrib/lo in your package ?

I've tried that and it didn't work. Hiroshi, could you please reply the
latest Corydon's message in http://bugs.digium.com/view.php?id=8513 ?

He suspects about a buffer overflow in the ODBC driver for PGSQL.

Kind regards,

--
caio[1982] begotti
http://caio.ueberalles.net