Re: updateable cursors & visibility - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: updateable cursors & visibility
Date
Msg-id Pine.LNX.4.44.0303251735370.1651-100000@peter.localdomain
Whole thread Raw
In response to Re: updateable cursors & visibility  (Neil Conway <neilc@samurai.com>)
Responses Re: updateable cursors & visibility
List 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@gmx.net



pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: New structers for optimazing R-tree
Next
From: Peter Eisentraut
Date:
Subject: Autoheader plan