Re: Cursor Issue??

From: "DracKewl" <bradbudge(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Cursor Issue??
Date: 2005-07-27 19:21:34
Message-ID: 1122492094.788112.300790@g14g2000cwa.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I found using the shell works but using the phAdminIII GUI is the one
that gives me problems. I've even tried running it on EMS PostgreSQL
Manager 3. Same results. Is this normal?

Got a couple more questions regarding cursors.
1. When I try to run this statement (Declare curs1 refcursor;) I get
an error ERROR: syntax error at or near "refcursor" at character 23
2. Using Fetch count; also barfs on me.
3. After I use Fetch First how do I take the contents and insert them
into another table?
This is my guess.
FETCH FIRST IN cursor1 INTO partstemp(qty, length, width)

BEGIN;
DECLARE cursor1 CURSOR FOR SELECT * FROM PARTS;
FETCH FIRST IN cursor1 INTO partstemp(qty, length, width); << My
guess but doesnt work.
CLOSE cursor1;
COMMIT;

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brian Wong 2005-07-27 19:28:36 DELETE with JOIN syntax
Previous Message Richard Huxton 2005-07-27 19:00:27 Re: Upgrading from 7.1