Re: set return function is returning a single record, multiple

Поиск
Список
Период
Сортировка
От Alexis Paul Bertolini
Тема Re: set return function is returning a single record, multiple
Дата
Msg-id 4451F56F.8030608@computer.org
обсуждение исходный текст
Ответ на set return function is returning a single record, multiple times,how can i get all the records in the table( description inside )  ("Penchalaiah P." <penchalaiahp@infics.com>)
Список pgsql-sql
> CREATE or replace  FUNCTION ftoc9() RETURNS setof  structrankmaster2  
> LANGUAGE 'plpgsql'
>
>  AS' DECLARE
>
>  rowdata pss%rowtype;
>
> BEGIN for i in 1..3 loop
>
> select * into rowdata from pss ;
>
> return next rowdata ;
>
> end loop;
>
> return;
>
> end';
>
The query should be outside the loop, otherwise you are re-running the 
query each time :-)

Alex


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

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: set return function is returning a single record, multiple times,how can i get all the records in the table( description inside )
Следующее
От: Emils
Дата:
Сообщение: Outer joins?