Search Postgresql Archives

different results for large objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux