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

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

> -----Original Message-----
> From: Tom Lane
>
> I wrote:
> > 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?
>
> More specifically, the problem is that plpgsql's FOR-over-a-select now
> depends on a SPI cursor, and both SPI cursors and regular cursors are
> broken in this regard. Observe the following misbehavior with a plain
> cursor:

This is a known issue. We should implement INSENSITIVE cursors
to avoid this behavior. The keyword INSENSITIVE is there but isn't
used long. I plan to implement this feature as the first step toward
cross transaction cursors. Saving the xid and commandid in the
portal or snapshot and restoring them at fetch(move) time would
solve it.

regards,
Hiroshi Inoue

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Heather Grace 2002-02-14 16:58:51 at time zone question in pl/pgSQL
Previous Message Liam DeMasi 2002-02-14 16:09:22 Re: PRIMARY KEY and UNIQUE

Browse pgsql-hackers by date

  From Date Subject
Next Message Doug McNaught 2002-02-14 16:58:58 Re: Upgrading to 7.2
Previous Message Chris Field 2002-02-14 16:25:00 Upgrading to 7.2

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2002-02-14 17:10:53 Re: [GENERAL] Postgres 7.2 - Updating rows in cursor problem
Previous Message Tom Lane 2002-02-14 02:12:05 Re: [GENERAL] Postgres 7.2 - Updating rows in cursor problem