Re: loop with circular updates - Mailing list pgsql-general

From Jessica M Salmon
Subject Re: loop with circular updates
Date
Msg-id OF943EFD7A.9C30B5E1-ON872571B9.00495B68-872571B9.0049C65B@fs.fed.us
Whole thread Raw
In response to Re: loop with circular updates  (Kenneth Downs <ken@secdat.com>)
Responses Re: loop with circular updates  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I'm not sure if my second email made it through; I haven't seen it on the
website yet. But, basically, what I am asking is this:
      -is it true that when looping over query results in a plpgsql
for..in..execute loop, several records are stored in memory at one time?
and if so, then I am wondering:
      -if I then update one of the records currently in memory, are these
changes visible when the loop gets to it?

I hope that someone can tell me these things.
Thanks,
Meghan



             Kenneth Downs
             <ken@secdat.com>
                                                                        To
             07/26/2006 08:50          Jessica M Salmon
             AM                        <jmsalmon@fs.fed.us>
                                                                        cc
                                       pgsql-general@postgresql.org
                                                                   Subject
                                       Re: [GENERAL] loop with circular
                                       updates










Jessica M Salmon wrote:

>Hi All.
>
>I'm writing a plpgsql function that creates a table and loops over the
>items in that table, using a FOR ... IN EXECUTE ... loop. The thing is, on
>each iteration I update the table over which I am looping. Sometimes, the
>result of this update makes it no longer necessary/desirable to process
>subsequent records in the loop.
>
>
Can you tell us more about the app?  Sounds like an ERP allocation or
something like that.

(See attached file: ken.vcf)

Attachment

pgsql-general by date:

Previous
From: Arnaud Lesauvage
Date:
Subject: Create spatial_ref_sys entry from srtext ?
Next
From: Tom Lane
Date:
Subject: Re: Using an alternate PGDATA on RHEL4 with SELinux enabled