Re: [ODBC] BLOB handling compatibility with PostgreSQL > 7.4
- From: Ludek Finstrle <luf(at)pzkagis(dot)cz>
- To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
- Cc: pgsql-interfaces(at)postgresql(dot)org, pgsql-odbc(at)postgresql(dot)org
- Subject: Re: [ODBC] BLOB handling compatibility with PostgreSQL > 7.4
- Date: Tue, 6 Dec 2005 22:50:22 +0100
- Message-id: <20051206215022.GB24711@soptik.pzkagis.cz> <text/plain>
> > Does it cover lo_export which need oid as second parameter?
>
> You could make an implicit cast from lo to oid ... perhaps not the other
> direction, though.
Thank you. This way helps. I have to create implicit cast in oid->lo too
becouse there is lo_import function.
Is any reason to don't do it? I don't see this reasen as lo is same
type as oid.
CREATE FUNCTION loin (cstring) RETURNS lo AS 'oidin' LANGUAGE internal IMMUTABLE STRICT;
CREATE FUNCTION loout (lo) RETURNS cstring AS 'oidout' LANGUAGE internal IMMUTABLE STRICT;
CREATE FUNCTION lorecv (internal) RETURNS lo AS 'oidrecv' LANGUAGE internal IMMUTABLE STRICT;
CREATE FUNCTION losend (lo) RETURNS bytea AS 'oidrecv' LANGUAGE internal IMMUTABLE STRICT;
CREATE TYPE lo ( INPUT = loin, OUTPUT = loout, RECEIVE = lorecv, SEND = losend, INTERNALLENGTH = 4, PASSEDBYVALUE );
CREATE CAST (lo AS oid) WITHOUT FUNCTION AS IMPLICIT;
CREATE CAST (oid AS lo) WITHOUT FUNCTION AS IMPLICIT;
Thank you very much
Luf
Home |
Main Index |
Thread Index