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

Re: Cursor Error

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>
Subject: Re: Cursor Error
Date: 2008-07-31 16:50:50
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
"Bob Pawley" <rjpawley(at)shaw(dot)ca> writes:
> 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;

Sorry, we're not bright enough to handle WHERE CURRENT OF on a join
--- per the fine manual,

	The cursor must be a simple (non-join, non-aggregate) query on
	the UPDATE's target table.

I don't recall offhand whether there's some deep technical reason
for the restriction against joins, or we just didn't get around to
it.  In any case, you'll need to change the cursor to return the
table's primary key and use that to target the UPDATE.

			regards, tom lane

In response to


pgsql-general by date

Next:From: Mike GouldDate: 2008-07-31 16:54:46
Subject: Partitioned tables and views
Previous:From: Bob PawleyDate: 2008-07-31 16:45:20
Subject: Re: Cursor Error

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