Skip site navigation (1) Skip section navigation (2)

Re: Updateable cursors patch

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "FAST PostgreSQL" <fastpgs(at)fast(dot)fujitsu(dot)com(dot)au>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Updateable cursors patch
Date: 2007-05-18 13:02:01
Message-ID: 162867790705180602x9305b2fw84b73d304008348@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-patches
2007/5/18, FAST PostgreSQL <fastpgs(at)fast(dot)fujitsu(dot)com(dot)au>:
> 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.

I am for it. It good protection before strange bugs

Pavel

>
> Rgds,
> Arul Shaji
>
>
> Pavel Stehule wrote:
> > 2007/5/18, FAST PostgreSQL <fastpgs(at)fast(dot)fujitsu(dot)com(dot)au>:
> >> 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 the sql standards.)
> >
> > some scrollable cursors are materialised. It depends on query :-(.
> > Simple query without join can works.
> >
> > regards
> >
> > Pavel
> >
> >>
> >> I can update the documentation once the initial review is done and what
> >> I have done gets atleast a pass mark :-)
> >>
> >> Rgds,
> >> Arul Shaji
> >>
> >>
> >> Pavel Stehule wrote:
> >> > 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 <fastpgs(at)fast(dot)fujitsu(dot)com(dot)au>:
> >> >> 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:
> >> >> > 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 <fastpgs(at)fast(dot)fujitsu(dot)com(dot)au> 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.postgresql.org/pgsql-committers/2007-04/msg00447.php
> >> >> >>
> >> >> >
> >> >> >
> >> >> > ---------------------------(end of
> >> >> broadcast)---------------------------
> >> >> > TIP 6: explain analyze is your friend
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >> ---------------------------(end of
> >> broadcast)---------------------------
> >> >> TIP 7: You can help support the PostgreSQL project by donating at
> >> >>
> >> >>                 http://www.postgresql.org/about/donate
> >> >>
> >> >>
> >> >>
> >> >
> >> > ---------------------------(end of
> >> broadcast)---------------------------
> >> > TIP 3: Have you checked our extensive FAQ?
> >> >
> >> >               http://www.postgresql.org/docs/faq
> >> >
> >> >
> >>
> >>
> >> ---------------------------(end of broadcast)---------------------------
> >> TIP 1: if posting/reading through Usenet, please send an appropriate
> >>        subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> >>        message can get through to the mailing list cleanly
> >>
> >
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match
>

In response to

pgsql-patches by date

Next:From: Bruce MomjianDate: 2007-05-18 13:54:59
Subject: Re: Maintaining cluster order on insert
Previous:From: Heikki LinnakangasDate: 2007-05-18 12:11:52
Subject: Re: Concurrent psql patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group