possible odbc driver bug with postgresql-7.4

possible odbc driver bug with postgresql-7.4

am 12.12.2006 12:42:20 von Caio Begotti

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@debian.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



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Re: possible odbc driver bug with postgresql-7.4

am 12.12.2006 18:11:11 von Tom Lane

Caio Begotti 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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Re: possible odbc driver bug with postgresql-7.4

am 12.12.2006 18:30:20 von Caio Begotti

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



---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Re: possible odbc driver bug with postgresql-7.4

am 13.12.2006 01:03:05 von Caio Begotti

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



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Re: possible odbc driver bug with postgresql-7.4

am 13.12.2006 04:33:35 von Hiroshi Inoue

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@debian.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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Re: possible odbc driver bug with postgresql-7.4

am 13.12.2006 04:40:09 von Caio Begotti

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



---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Re: possible odbc driver bug with postgresql-7.4

am 13.12.2006 04:57:29 von Hiroshi Inoue

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


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Re: possible odbc driver bug with postgresql-7.4

am 13.12.2006 05:05:46 von 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?

Cheers,

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



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Re: possible odbc driver bug with postgresql-7.4

am 13.12.2006 05:43:49 von Hiroshi Saito

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


---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Re: possible odbc driver bug with postgresql-7.4

am 13.12.2006 06:45:24 von Hiroshi Inoue

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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Re: possible odbc driver bug with postgresql-7.4

am 13.12.2006 08:34:06 von Ludek Finstrle

> >>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

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Re: possible odbc driver bug with postgresql-7.4

am 14.12.2006 19:22:21 von Caio Begotti

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



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings