Re: Cursor Error

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Bob Pawley <rjpawley(at)shaw(dot)ca>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Cursor Error
Date: 2008-08-01 08:27:30
Message-ID: 4892C8F2.2020007@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bob Pawley wrote:
> Is it allowed to declare a cursor in this manner??
>
> Declare
> procgraphic cursor 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;

Using DECLARE instead of OPEN? Yes, but that won't somehow make a cursor
involving a join updatable. See:

http://www.postgresql.org/docs/8.3/interactive/plpgsql-cursors.html

DECLARE and OPEN do not have exactly the same meaning, as explained by
the above documentation. To use a cursor defined with DECLARE you must
use OPEN - see section 38.7.2.3 ("Opening a Bound Cursor") of the
documentation.

--
Craig Ringer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marc Cuypers 2008-08-01 09:06:54 Postgresql not using an index
Previous Message Craig Ringer 2008-08-01 08:21:11 Re: Copy fails