Just FYI, recent versions of PG use cursors internally for PL/pgSQL FOR
loops. So there is no danger for a procedure to run out of memory when
looping over a huge result set ... at least not because of that.
Jan
Dennis wrote:
> Tom Lane writes:
>
>> Something like
>>
>> LOOP
>> FETCH ...;
>> EXIT WHEN NOT found;
>> ...
>> END LOOP;
>
> Thank you! I tried finding documentation on "found" in this context and
> didn't come up with anything. Can you point me to where it is documented?
>
> Also, I am not getting the results I think I should be getting. Is there any
> kind of debug setting, or if not that, a way to output text (i.e. printf)
> from plpgsql?
>
> Thanks,
>
> Dennis
> pg-user@calico-consulting.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #