PLPGSQL Returning Records

From: Alex <alex(at)meerkatsoft(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: PLPGSQL Returning Records
Date: 2003-11-18 07:14:21
Message-ID: 3FB9C6CD.8030908@meerkatsoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I am trying to return a recod from from my function but for some reason
it does not work.

Here is may problem. I use a for loop to generate the first batch of
records. Once the loop is completed I want to add another record. But at
that point fails.

....

FOR rec IN SELECT ....
LOOP

RETURN NEXT r;
END LOOP;

do some assignments
RETURN r;

....

It seems that the function does not return anything after the loop. Can
anyone help me on that ?

Thanks
Alex

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mark Kirkwood 2003-11-18 07:16:27 Re: snort, acid and postgres
Previous Message Gianni Mariani 2003-11-18 06:55:40 building 7.4 with plperl