Re: Why isn't DECLARE CURSOR ... FOR UPDATE supported?

From: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Rod Taylor <pg(at)rbt(dot)ca>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why isn't DECLARE CURSOR ... FOR UPDATE supported?
Date: 2003-12-18 21:38:35
Message-ID: Pine.LNX.4.58.0312190837270.9976@linuxworld.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 18 Dec 2003, Tom Lane wrote:

> Rod Taylor <pg(at)rbt(dot)ca> writes:
> > On Thu, 2003-12-18 at 10:20, Tom Lane wrote:
> >> Is there any good reason for this restriction?
>
> > The help implies you can.
>
> > DECLARE name [ BINARY ] [ INSENSITIVE ] [ [ NO ] SCROLL ]
> > CURSOR [ { WITH | WITHOUT } HOLD ] FOR query
> > [ FOR { READ ONLY | UPDATE [ OF column [, ...] ] } ]
>
> Hmm. Actually that is describing the SQL spec's syntax for DECLARE
> CURSOR, in which you can name specific *columns* not tables as being
> updatable through the cursor. Now that I think about it, the error
> check is probably there to catch anyone who writes "FOR UPDATE OF
> column" expecting to get the SQL spec behavior.
>
> I'm not sure whether anyone is planning to try to converge our notion of
> FOR UPDATE with the spec's. If that is going to happen someday, it'd
> probably be best not to introduce directly conflicting behavior into
> DECLARE CURSOR. Oh well...

I was going to look at it for 7.5. However, we don't have column locks
:-(.

Thanks,

Gavin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Sabino Mullane 2003-12-19 02:33:33 PostgreSQL speakers needed for OSCON 2004
Previous Message Andrew Dunstan 2003-12-18 20:17:26 Re: replace all with * in pg_hba.conf