updateable cursors & visibility - Mailing list pgsql-hackers

From Neil Conway
Subject updateable cursors & visibility
Date
Msg-id 1048542558.421.87.camel@tokyo
Whole thread Raw
Responses Re: updateable cursors & visibility  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: updateable cursors & visibility  (snpe <snpe@snpe.co.yu>)
List pgsql-hackers
Folks,

I'd like to implement updateable cursors. I'll be working on just
getting updateable cursors working for relatively simple SELECT queries
(e.g. no joins, aggregates, grouping, user-defined function calls,
etc.). BTW, I believe that's all the SQL spec requires, but I need to
double check that. I'm also planning on only implementing only
INSENSITIVE cursors, and not allowing holdable cursors.

However, I'm a little unsure how tuple visibility should work with
updateable cursors. In particular:

- if the user updates a row X in the cursor, then rewinds the cursor and
fetches X again, should they see the new X or the old X?

- if the user updates a row X in the cursor, and then a query within the
cursor's transaction views X, should the query see new X or old X?

Any comments?

Neil



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: A bad behavior under autocommit off mode
Next
From: Tom Lane
Date:
Subject: Re: updateable cursors & visibility