From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Neil Conway <neilc(at)samurai(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: updateable cursors & visibility |
Date: | 2003-03-24 22:16:36 |
Message-ID: | 20800.1048544196@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Neil Conway <neilc(at)samurai(dot)com> writes:
> - 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 it's considered an insensitive cursor, I'd think it should see the
old X. You would have a hard time making the code do otherwise in any
case --- the cursor's snapshot is frozen when the cursor is created.
> - 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?
The subsequent query (if it's not going through the cursor) should and
will see the new X.
This should all be handled for you by the command-counter-based
visibility rules; I don't think you need to worry about it.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Nick Piggin | 2003-03-24 22:30:50 | Re: IO scheduler vs PostgreSQL performance measurement |
Previous Message | Neil Conway | 2003-03-24 21:49:19 | updateable cursors & visibility |