Thread: Bug report 2267: Accessing large objects via ODBC

Bug report 2267: Accessing large objects via ODBC

From
Gerhard.Lutz@mbtech-group.com
Date:

Bug report 2267: Accessing large objects via ODBC
===========================================

I want to upgrade my PostgreSQL server from 8.0.4 to 8.1.3.
My C++ application connects to the database via ODBC (ODBC driver: PostgreSQL Unicode).

I've installed 8.1.3 with "large objects (lo)" and created a table

CREATE testdata
(id integer not null,
buffer lo);

So far this worked.
Now if I want to get the 'buffer' column

::SQLExecDirect(m_hStmt, (unsigned char*)"SELECT buffer FROM testdata WHERE id=6", SQL_NTS);
::SQLFetch(m_hStmt);
::SQLGetData(m_hStmt, nCol, SQL_C_BINARY, pBuffer, nPacketSize,  &sdODataLength);

I get the error message

"Received an unsupported type from Postgres. (14)"

In PostgreSQL 8.0.4 this worked without a problem.
In 8.1.3 I can also see in pgAdmin III that there are no functions lo_in(lo) and lo_out(lo) in the tree.

Perhaps this is an installation bug in 8.1.3?
Has anybody got an idea?


Best regards

Gerhard Lutz

Test Solutions
MB-technology GmbH

Fon +49-160/8609695
Fax  +49-711-3052120743
mailto:gerhard.lutz@mbtech-group.com
Mailing address:     HPC G170 / D-71059 Sindelfingen
Visitors address:    Kolumbusstrasse 2 / D-71063 Sindelfingen        
                                                                                                                                         
Notice:
This email may contain confidential information. If you are not the addressee you are not authorized to make use of the information contained in this email.
Please inform us immediately that you have received it by mistake.

Re: Bug report 2267: Accessing large objects via ODBC

From
Ludek Finstrle
Date:
> WHERE id=6", SQL_NTS);
> ::SQLFetch(m_hStmt);
> ::SQLGetData(m_hStmt, nCol, SQL_C_BINARY, pBuffer, nPacketSize,
> &sdODataLength);
>
> I get the error message
>
> "Received an unsupported type from Postgres. (14)"
>
> In PostgreSQL 8.0.4 this worked without a problem.
> In 8.1.3 I can also see in pgAdmin III that there are no functions
> lo_in(lo) and lo_out(lo) in the tree.
>
> Perhaps this is an installation bug in 8.1.3?
> Has anybody got an idea?

I see no psqlODBC version in your report.
How did you create the lo type? Did you follow psqlODBC FAQ?

Regards,

Luf

Re: Bug report 2267: Accessing large objects via ODBC

From
Gerhard.Lutz@mbtech-group.com
Date:

The version of PSQLODBC.DLL is 8.01.02.00.
In version 8.00.01.03 I didn't have this problem.

I didn't create the lo type explicitly. I just checked the checkbox "Large Objects (lo)"
while installing PostgreSQL. This worked with PostgreSQL 8.0.4.

I didn't find a special psqlODBC FAQ, only the general FAQ lists at www.postgresql.org.

Best regards,
Gerhard Lutz



luf@pzkagis.cz
Gesendet von: pgsql-odbc-owner@postgresql.org

27.02.2006 14:24

An
Gerhard.Lutz@mbtech-group.com
Kopie
pgsql-odbc@postgresql.org
Thema
Re: [ODBC] Bug report 2267: Accessing large objects via ODBC



> I want to upgrade my PostgreSQL server from 8.0.4 to 8.1.3.
> My C++ application connects to the database via ODBC (ODBC driver: PostgreSQL Unicode).
>
> I've installed 8.1.3 with "large objects (lo)" and created a table
>
> CREATE testdata
> (id integer not null,
> buffer lo);
>
> So far this worked.
> Now if I want to get the 'buffer' column
>
> ::SQLExecDirect(m_hStmt, (unsigned char*)"SELECT buffer FROM testdata WHERE id=6", SQL_NTS);
> ::SQLFetch(m_hStmt);
> ::SQLGetData(m_hStmt, nCol, SQL_C_BINARY, pBuffer, nPacketSize,
> &sdODataLength);
>
> I get the error message
>
> "Received an unsupported type from Postgres. (14)"
>
> In PostgreSQL 8.0.4 this worked without a problem.
> In 8.1.3 I can also see in pgAdmin III that there are no functions
> lo_in(lo) and lo_out(lo) in the tree.
>
> Perhaps this is an installation bug in 8.1.3?
> Has anybody got an idea?

I see no psqlODBC version in your report.
How did you create the lo type? Did you follow psqlODBC FAQ?

Regards,

Luf

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