Oid problem - Mailing list pgsql-general

From Sky
Subject Oid problem
Date
Msg-id 40755FED.9010003@sylvio.hu
Whole thread Raw
Responses Re: Oid problem
List pgsql-general
Problem:
pg_loopen() unable to open PostgreSQL large object in...

Solution from another mailing list:
My blob oid was very big.
I had to cast to (float) the oid parameter of pg_loopen.

Question:
The oid is a type, isn't it?
I tried to use the oid in a function:

CREATE FUNCTION addfoto(character varying, oid)
RETURNS INTEGER
AS
 '
 BEGIN;
 INSERT INTO foto(filename, image) VALUES ( $1, $2 );
 COMMIT;
 SELECT 1 AS RESULT;
 '
LANGUAGE 'sql';

So, What can I do, and how, how can I "CAST" ??

--
Sky
sky AT sylvio .hu
Debian Group - Association of Hungarian Linux Users
Accessibility Project leader
gpg --keyserver hkp://pgp.mit.edu --recv-keys 314D1B0C
fingerprint = B211 E8C7 C6C2 18B2 9F30  ADF6 EDD9 A7FA 314D 1B0C


pgsql-general by date:

Previous
From: Jeff Eckermann
Date:
Subject: Re: eval in plpgsl
Next
From: Jan Wieck
Date:
Subject: Re: eval in plpgsl