Re: [GENERAL] Postgres 7.2 - Updating rows in cursor problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vaclav Kulakovsky <vaclav(dot)kulakovsky(at)definity(dot)cz>
Cc: pgsql-hackers(at)postgreSQL(dot)org, Jan Wieck <JanWieck(at)Yahoo(dot)com>
Subject: Re: [GENERAL] Postgres 7.2 - Updating rows in cursor problem
Date: 2002-02-13 19:47:24
Message-ID: 270.1013629644@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-patches

Vaclav Kulakovsky <vaclav(dot)kulakovsky(at)definity(dot)cz> writes:
> I've a problem in PG 7.2. If you update rows which are included in plpgsql
> RECORD , updated rows are again added to the RECORD, so you will get into
> infinite loop.

This is a bug in plgsql, or more precisely in SPI, I think. The FOR
statement needs to restore its initial value of scanCommandId each time
it resumes execution of the SELECT. Seems like that should be done down
inside SPI. Comments?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Anto 2002-02-13 21:50:40 insert within pl/pgsql procedures: NOVICE question ?
Previous Message Luke Myers 2002-02-13 19:28:46 Re: pgaccess failed, used to work

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2002-02-13 20:07:50 NAMEDATALEN Changes
Previous Message Tom Lane 2002-02-13 19:33:42 Re: Permissions problem

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2002-02-13 22:53:19 Re: [GENERAL] Postgres 7.2 - Updating rows in cursor problem
Previous Message Vaclav Kulakovsky 2002-02-13 08:47:49 Postgres 7.2 - Updating rows in cursor problem