Search Postgresql Archives

Re: Plpgsql function syntax error at first coalesce statement

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

 



On 25/04/2010 20:50, Jeff Ross wrote:

> Now I'm *really* confused.  I thought the table structure I created at
> the beginning of the function was where the results would be returned
> to.  I tried a variety of queries including select into and create table
> but they didn't work either.

I think you have to do RETURN NEXT inside the loop:

create function....
declare
  return_row record;
  ...
begin
  ...
  for..
  loop
    select ... into return_row;
    return next return_row;
  end loop;
  ...
  return;
end;


Ray.

-- 
Raymond O'Donnell :: Galway :: Ireland
rod@xxxxxx

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[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