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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces pgsql-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

Browse pgsql-interfaces by date

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

Browse pgsql-odbc by date

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