From: c k <shreeseva.learning@gmail.com>
To: pgsql-general@postgresql.org
To: pgsql-admin@postgresql.org
Subject: different results for large objects
Date: Tue, 17 Mar 2009 17:26:44 +0530
Message-ID: <d8e7a1e30903170456q767429dt4170f19662fbd2c9@mail.gmail.com> (raw)
I am getting correct results with following query i.e. binary objects as
they are inserted.
select docimages.* from docimages where docimages.accobjecttype=9 ORDER BY
docimages.docimagename;
but when I created a function as follows, binary objects are not shown,
rather a number represting the large object on the server is shown.
CREATE OR REPLACE FUNCTION software.uf_searchdocimages(integer, integer,
integer)
RETURNS SETOF docimages AS
$BODY$
--select images for all object of specified type
select docimages.* from docimages where docimages.accobjecttype= $2
ORDER BY docimages.docimagename;
$BODY$
LANGUAGE 'sql' VOLATILE SECURITY DEFINER
COST 1
ROWS 10;
The problem is arising for a field of type 'lo'. Why this function is not
giving the actual large object?
I am using Windows XP sp3, PostgreSQL 8.3.6.
The table definitions is like below-
CREATE TABLE docimages
(
diid serial NOT NULL,
docimagename character varying(50),
docimage lo,
accobjectid integer,
accobjecttype integer,
CONSTRAINT pk_docimages PRIMARY KEY (diid)
)
WITH (OIDS=FALSE);
Please reply.
Thanks in adavnce.
CPKulkarni
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-admin@postgresql.org
Cc: shreeseva.learning@gmail.com, pgsql-general@postgresql.org
Subject: Re: different results for large objects
In-Reply-To: <d8e7a1e30903170456q767429dt4170f19662fbd2c9@mail.gmail.com>
* 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