From: | "Bob Pawley" <rjpawley(at)shaw(dot)ca> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "PostgreSQL" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Cursor Error |
Date: | 2008-07-31 16:45:20 |
Message-ID: | 006101c8f32c$d2505610$6401a8c0@owner |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Right.
This is the cursor statement.
Open procgraphic for select p_id.p_id.process_id from p_id.p_id,
processes_count
where p_id.p_id.p_id_id = processes_count.p_id_id;
If process_total = 1 Then
Fetch first from procgraphic into process_id;
Update p_id.p_id
set proc_graphic_position = '1'
where current of procgraphic;
I get the same error message when I define the cursor with the same select.
I am not sure how to make the query simpler and still have it access the
right row on fetch.
Bob
----- Original Message -----
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Bob Pawley" <rjpawley(at)shaw(dot)ca>
Cc: "PostgreSQL" <pgsql-general(at)postgresql(dot)org>
Sent: Thursday, July 31, 2008 9:30 AM
Subject: Re: [GENERAL] Cursor Error
> "Bob Pawley" <rjpawley(at)shaw(dot)ca> writes:
>> Could somebody translate this error message for me??
>> "cursor <unnamed portal 1> is not simply updateable scan of table "p_id"
>
> You're trying to do an "UPDATE WHERE CURRENT OF cursor", right?
> What it means is that the cursor definition is too complicated for
> Postgres to figure out which row to update. Without seeing the
> cursor definition it's hard to say more.
>
> regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-07-31 16:50:50 | Re: Cursor Error |
Previous Message | Tom Lane | 2008-07-31 16:30:54 | Re: Cursor Error |