Skip site navigation (1) Skip section navigation (2)

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: 2005-12-06 21:50:22
Message-ID: 20051206215022.GB24711@soptik.pzkagis.cz (view raw or flat)
Thread:
Lists: pgsql-interfacespgsql-odbc
> > 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

In response to

pgsql-odbc by date

Next:From: Ludek FinstrleDate: 2005-12-06 22:25:30
Subject: Re: BLOB handling compatibility with PostgreSQL > 7.4
Previous:From: DWilkersonDate: 2005-12-06 21:44:05
Subject: ERROR - no error information available

pgsql-interfaces by date

Next:From: Ludek FinstrleDate: 2005-12-06 22:25:30
Subject: Re: BLOB handling compatibility with PostgreSQL > 7.4
Previous:From: Tom LaneDate: 2005-12-06 19:59:40
Subject: Re: [ODBC] BLOB handling compatibility with PostgreSQL > 7.4

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group