query has no destination for result data

Поиск
Список
Период
Сортировка
От Patta
Тема query has no destination for result data
Дата
Msg-id i2nd6d29ae21004231522yd302e5b3h3b1d0de9091ddc6@mail.gmail.com
обсуждение исходный текст
Ответы Re: query has no destination for result data  (Alan Hodgson <ahodgson@simkin.ca>)
Re: query has no destination for result data  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Hi,

I'm a beginner in postgresql. I get the below error. Could you help me
to fix this one?

ERROR:  query has no destination for result data
HINT:  If you want to discard the results of a SELECT, use PERFORM instead.
CONTEXT:  PL/pgSQL function "insertcommjunction1" line 7 at SQL statement

The function is as follows.
CREATE OR REPLACE FUNCTION test()
  RETURNS text AS
$BODY$
DECLARE
     query_rec record;
     idxfti tsvector;
     c1 cursor for select * from <table>;
Begin
open c1;
Loop
fetch c1 into query_rec;
begin
raise notice 'Record %', query_rec.field1;
end;
End loop;
Return 'ok';
end;
$BODY$
  LANGUAGE 'plpgsql' VOLATILE;

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

Предыдущее
От: Sean Linkous
Дата:
Сообщение: install both i386 and x86_64 libs
Следующее
От: Alan Hodgson
Дата:
Сообщение: Re: query has no destination for result data