On Wed, Jan 26, 2005 at 03:33:07PM +1100, Neil Conway wrote:
> Tom Lane wrote:
> >The routine's comments need a bit of work too. Otherwise it seems OK.
> >Neil or anyone else --- see an issue here?
>
> The policy will now be: cursor creation is transaction, but cursor state
> modifications (FETCH) are non-transactional -- right? I wonder if it
> wouldn't be more consistent to make cursor deletion (CLOSE)
> transactional as well -- so that a CLOSE in an aborted subtransaction
> would not actually destroy the cursor.
Hmm ... not sure how hard that is. We left a lot of details for 8.1
though, like trying to save the state of the executor related to the
cursor so that FETCH is transactional too.
> Other than that, I think there ought to be some user-level documentation
> for how cursors and savepoints interact,
There is some detail (as of my patch, outdated) in
http://developer.postgresql.org/docs/postgres/sql-rollback-to.html
If you have a suggestion on where else it should go I'm all ears ...
> and some regression tests for this behavior, but I'm happy to add that
> myself if no one beats me to it.
Please do.
I'll post a corrected patch ASAP, including the doc change.
--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"La espina, desde que nace, ya pincha" (Proverbio africano)