From: Ludek Finstrle <luf@pzkagis.cz>
To: pgsql-interfaces@postgresql.org
Cc: pgsql-odbc@postgresql.org
Subject: Re: [ODBC] BLOB handling compatibility with PostgreSQL > 7.4
Date: Mon, 5 Dec 2005 22:28:06 +0100
Message-ID: <20051205212806.GA17690@soptik.pzkagis.cz> (raw)
In-Reply-To: <438B792D.6030802@bnl.gov>
References: <438B792D.6030802@bnl.gov>
> We would like to upgrade the Postgres version from our current 7.3 but
> have problems with handling BLOBs via ODBC.
> We use unixODBC-2.2.11 and psqlodbc-08.01.0101.
> With postgres 7.3 lo type was mapped to SQL_C_BINARY and that's changed
> since postgres 7.4.
> Is it an ODBC or a driver issue? Are there any plans to fix the problem?
Hello,
Irine report problem with ODBC. I take deep look at it and find that
lib return base type aid instead of type aid. I'll describe it better.
We have this test suite:
CREATE DOMAIN lo as oid;
CREATE TABLE ow)(b lo);
insert one row:
INSERT INTO es=# select oid from pg_type where typname='lo'; VALUES (lo_import('file'));
we try get it throught libpq (maybe I miss some command):
- PQsetNoticeProcessor(, CC_handle_notice, qres);
- pgres = PQexec(pgconn,query);
- PQsetNoticeProcessor(pgconn, CC_handle_notice, NULL);
...
- typid = PQftype(pgres,i);
this return typid = 26 (oid) instead of 25087 (lo)
postgres=# select oid from pg_type where typname='oid';
oid
-----
26
(1 row)
postgres=# select oid from pg_type where typname='lo';
oid
-------
25087
(1 row)
Is there a way to get 25087? It seems this behaviour is changed between
PgSQL 7.3 and 7.4. It looks like backend issue. Becouse with same binary
it return different values for 7.3 and >= 7.4 (all PgSQL > 7.3 return
typid = 26 - directly tested 7.4, 8.1).
Thanks a lot for help
Luf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: luf@pzkagis.cz, pgsql-odbc@postgresql.org
Subject: Re: [ODBC] BLOB handling compatibility with PostgreSQL > 7.4
In-Reply-To: <20051205212806.GA17690@soptik.pzkagis.cz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox