different results for large objects

Поиск
Список
Период
Сортировка
От c k
Тема different results for large objects
Дата
Msg-id d8e7a1e30903170456q767429dt4170f19662fbd2c9@mail.gmail.com
обсуждение исходный текст
Ответы Re: [GENERAL] different results for large objects  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
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

В списке pgsql-admin по дате отправления:

Предыдущее
От:
Дата:
Сообщение: Re: Need help to restore database
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] different results for large objects