| From: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
|---|---|
| To: | pgsql-patches(at)postgresql(dot)org |
| Subject: | updateable cursors |
| Date: | 2003-07-26 13:31:11 |
| Message-ID: | Pine.LNX.4.21.0307262323040.12835-101000@linuxworld.com.au |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
Attached is a patch implementing updatable cursors in HEAD. Regression
test and documentation are included.
Updateable cursors are used as follows:
begin;
declare foo cursor for select * from bar for update;
fetch foo;
update bar set abc='def' where current of foo;
fetch foo;
delete from bar where current of foo;
commit;
Two points:
i) The patch doesn't implement updateable cursors for cursors marked WITH
HOLD. I have working code for this and will send it in soon.
ii) I've implemented a new snapshot type since, AFAICT, updateable cursors
have a type of tuple visibility. Namely, if the base table of a cursor is
updated based on that cursor, the new and old tuples are removed from the
cursor's set of visible tuples. Like wise, deleted tuples are also
removed.
Thanks,
Gavin
| Attachment | Content-Type | Size |
|---|---|---|
| wherecur2.diff.gz | application/x-gzip | 10.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2003-07-26 13:50:16 | Re: sslmode patch |
| Previous Message | Bruce Momjian | 2003-07-25 21:48:42 | Re: Minor pager corrections in print.c and help.c (psql) |