Re: how to use a cursor for update? - Mailing list pgsql-general

From Tom Lane
Subject Re: how to use a cursor for update?
Date
Msg-id 21771.1258729555@sss.pgh.pa.us
Whole thread Raw
In response to how to use a cursor for update?  (nicola zandonà <nick.zando@gmail.com>)
List pgsql-general
=?ISO-8859-1?Q?nicola_zandon=E0?= <nick.zando@gmail.com> writes:
> When i try to execute this code i get a :

> ERROR:  cursor "cur" is not a simply updatable scan of table "zone"
> CONTEXT:  SQL statement "UPDATE zone SET end_period =  $1  WHERE
> CURRENT OF  $2 "
> PL/pgSQL function "test_select" line 16 at SQL statement

The example works for me, using a simple definition of the "zone"
table.  Maybe your "zone" is not a table but a complicated view?

Or it could be a bug that's been fixed.  What PG version are you using?

            regards, tom lane

pgsql-general by date:

Previous
From: Ray Stell
Date:
Subject: Re: index storage planning
Next
From: Matthew Wakeling
Date:
Subject: Re: [PERFORM] Strange performance degradation