Re: [PATCHES] Updateable cursors patch

2007-05-20 Thread FAST PostgreSQL
> > maybe just send a better error message I do the transformation of a where current of clause into where clause at the analyze stage itself(which is the right place to do. I think). Hence this error. If I can postpone this transformation until after re-write then the usual error will be thro

Re: [PATCHES] Updateable cursors patch

2007-05-19 Thread Jaime Casanova
On 5/17/07, Jaime Casanova <[EMAIL PROTECTED]> wrote: On 5/17/07, FAST PostgreSQL <[EMAIL PROTECTED]> wrote: > No. It works with scrollable cursors. It will work for cursors/selects > which does not put the results in some store, such as WITH hold/group > by/order by etc But most of these res

Re: [PATCHES] Updateable cursors patch

2007-05-18 Thread Pavel Stehule
2007/5/18, FAST PostgreSQL <[EMAIL PROTECTED]>: Right. The current implementation allows only simple queries. Joins are disallowed. According to the standard, updateable cursors cannot be scrollable. So maybe I should put an explicit check during cursor creation disallowing scrollable updateable

Re: [PATCHES] Updateable cursors patch

2007-05-18 Thread FAST PostgreSQL
Correction Meant to say According to the standard, updateable cursors cannot be scrollable until we have full cursor update. FAST PostgreSQL wrote: Right. The current implementation allows only simple queries. Joins are disallowed. According to the standard, updateable cursors cannot be

Re: [PATCHES] Updateable cursors patch

2007-05-18 Thread FAST PostgreSQL
Right. The current implementation allows only simple queries. Joins are disallowed. According to the standard, updateable cursors cannot be scrollable. So maybe I should put an explicit check during cursor creation disallowing scrollable updateable cursors. Rgds, Arul Shaji Pavel Stehule wro

Re: [PATCHES] Updateable cursors patch

2007-05-17 Thread Pavel Stehule
2007/5/18, FAST PostgreSQL <[EMAIL PROTECTED]>: No. It works with scrollable cursors. It will work for cursors/selects which does not put the results in some store, such as WITH hold/group by/order by etc But most of these restrictions apply for normal 'Select for update' anyway. (With the or

Re: [PATCHES] Updateable cursors patch

2007-05-17 Thread Jaime Casanova
On 5/17/07, Jaime Casanova <[EMAIL PROTECTED]> wrote: On 5/17/07, FAST PostgreSQL <[EMAIL PROTECTED]> wrote: > No. It works with scrollable cursors. It will work for cursors/selects > which does not put the results in some store, such as WITH hold/group > by/order by etc But most of these res

Re: [PATCHES] Updateable cursors patch

2007-05-17 Thread Jaime Casanova
On 5/17/07, FAST PostgreSQL <[EMAIL PROTECTED]> wrote: No. It works with scrollable cursors. It will work for cursors/selects which does not put the results in some store, such as WITH hold/group by/order by etc But most of these restrictions apply for normal 'Select for update' anyway. (With

Re: [PATCHES] Updateable cursors patch

2007-05-17 Thread FAST PostgreSQL
No. It works with scrollable cursors. It will work for cursors/selects which does not put the results in some store, such as WITH hold/group by/order by etc But most of these restrictions apply for normal 'Select for update' anyway. (With the order by clause, the implementation is as per th

Re: [PATCHES] Updateable cursors patch

2007-05-17 Thread Pavel Stehule
Hello I am not sure, but your solution will faill on scrollable cursors (it's similar to holdable cursors). I miss part about limits in documentation. Propably updatable cursors aren't supported by plpgsql (and it's point to ToDo). Regards Pavel Stehule 2007/5/17, FAST PostgreSQL <[EMAIL PROTEC

Re: [PATCHES] Updateable cursors patch

2007-05-17 Thread Bruce Momjian
Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews and approves it. --- FA

Re: [PATCHES] Updateable cursors patch

2007-05-17 Thread FAST PostgreSQL
Attached is an updated version of the updateable cursors patch against the latest cvs head. Most of the changes in the patch are to make it sync with the changes in CVS recently, for DECLARE CURSOR and EXPLAIN, as mentioned by Jaime in his mail below. Rgds, Arul Shaji FAST PostgreSQL wrote

Re: [PATCHES] Updateable cursors patch

2007-05-14 Thread FAST PostgreSQL
Right. I will send an updated patch against the CVS head in the next couple of days. Jaime Casanova wrote: On 4/4/07, FAST PostgreSQL <[EMAIL PROTECTED]> wrote: Attached is a working updateable cursors patch. The core functionality has been implemented and the patch also contains the regressi

Re: [PATCHES] Updateable cursors patch

2007-05-13 Thread Jaime Casanova
On 4/4/07, FAST PostgreSQL <[EMAIL PROTECTED]> wrote: Attached is a working updateable cursors patch. The core functionality has been implemented and the patch also contains the regression tests and documentation. this one doesn't apply cleanly to HEAD because of the changes in http://archives

Re: [PATCHES] Updateable cursors patch

2007-04-03 Thread FAST PostgreSQL
On Mon, 2 Apr 2007 03:15, Simon Riggs wrote: > Cool patch. > > On Wed, 2007-04-04 at 18:36 +, FAST PostgreSQL wrote: > > The planner has to be taught to treat a DELETE/UPDATE WHERE CURRENT OF > > as a TidScan. Currently it follows the sequential scan route and > > extracts the current tuple bas

Re: [PATCHES] Updateable cursors patch

2007-04-02 Thread Bruce Momjian
Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews and approves it. --- FA

Re: [PATCHES] Updateable cursors patch

2007-04-01 Thread Simon Riggs
Cool patch. On Wed, 2007-04-04 at 18:36 +, FAST PostgreSQL wrote: > The planner has to be taught to treat a DELETE/UPDATE WHERE CURRENT OF > as a TidScan. Currently it follows the sequential scan route and > extracts the current tuple based on the cursor position from the > portal. So you let

Re: [PATCHES] updateable cursors

2003-07-31 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > This has been saved for the 7.5 release: > http:/momjian.postgresql.org/cgi-bin/pgpatches2 "Saved for"? It's not gonna be acceptable in its current form for 7.5, either. regards, tom lane ---(end o

Re: [PATCHES] updateable cursors

2003-07-31 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > This has been saved for the 7.5 release: > > http:/momjian.postgresql.org/cgi-bin/pgpatches2 > > "Saved for"? It's not gonna be acceptable in its current form for 7.5, > either. I saved the patch plus your comments about it, so

Re: [PATCHES] updateable cursors

2003-07-31 Thread Bruce Momjian
This has been saved for the 7.5 release: http:/momjian.postgresql.org/cgi-bin/pgpatches2 --- Gavin Sherry wrote: > Attached is a patch implementing updatable cursors in HEAD. Regression > test and documentation are

Re: [PATCHES] updateable cursors

2003-07-31 Thread Bruce Momjian
This is exactly what I worried about, and having it arrive so long after feature freeze, there is no time to recover. I will hold it for 7.5. Thanks for the analysis. Sorry, Gavin. Saved to 7.5 open items queue. --- Tom

Re: [PATCHES] updateable cursors

2003-07-30 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Can I get some comments on this? It's far from ready for prime time :-( The main problem with it is it's doing the wrong things in the wrong places. The key part of the patch is a hack in parse_expr.c to transform "WHERE CURRENT OF cursor" into "WHERE

Re: [PATCHES] updateable cursors

2003-07-30 Thread Bruce Momjian
Can I get some comments on this? I know the work was completed pre-feature freeze, but submitted only recently. --- Gavin Sherry wrote: > Attached is a patch implementing updatable cursors in HEAD. Regression > test and doc

[PATCHES] updateable cursors

2003-07-26 Thread Gavin Sherry
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 wher