Re: updateable cursors & visibility

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: updateable cursors & visibility
Date: 2003-03-25 19:27:13
Message-ID: Pine.LNX.4.44.0303251735370.1651-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Neil Conway writes:

> 11) If an <updatability clause> of FOR UPDATE with or without a <column
> name list> is specified, then INSENSITIVE shall not be specified and QE
> shall be updateable.
>
> I'm not really sure I see the point of this restriction, though...

If you allow updatable insensitive cursors, then you are really saying,
whatever happens in the rest of the world does not affect my cursor, but
what I do in my cursor affects the rest of the world. You can easily
construct some cases where this would have bizarre results. For example,
someone inserts a primary key into the underlying table. You don't see it
in the cursor, so you happily insert the same primary key. How can you
and when should you detect this error? Also, since the snapshot of
insensitive cursors is frozen when the cursor is created, would you insert
new rows "in the past"? It's not really workable when you think it
through.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2003-03-25 21:27:13 Autoheader plan
Previous Message Oleg Bartunov 2003-03-25 17:55:35 Re: New structers for optimazing R-tree