| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | josh(at)agliodbs(dot)com |
| Cc: | Ludwig Lim <lud_nowhere_man(at)yahoo(dot)com>, PostgreSQL Mailing List <pgsql-sql(at)postgresql(dot)org> |
| Subject: | Re: plpgsql cursors : dynamic or static? |
| Date: | 2002-10-23 18:56:48 |
| Message-ID: | 3204.1035399408@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
Josh Berkus <josh(at)agliodbs(dot)com> writes:
>> Are cursors in plpgsql dynamic or static?
>>
>> FOR rec in SELECT f1,f2
>> FROM table1 WHERE .... LOOP
>>
>> /* some codes that manipulate table1 */
>> END LOOP;
> Technically speaking, that is not a cursor, even though it serves the same
> purpose.
> I'm pretty sure it's static, but it would be easy to test ... why don't you
> give it a try?
The result definitely will be static in 7.3. I'm not entirely sure
about prior releases: we used to manipulate the current-command counter
in a different way.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Haddon | 2002-10-23 20:17:25 | Sum of Every Column |
| Previous Message | Josh Berkus | 2002-10-23 18:21:00 | Re: plpgsql cursors : dynamic or static? |