Re: Cursor Issue?? - Mailing list pgsql-general

From Roman Neuhauser
Subject Re: Cursor Issue??
Date
Msg-id 20050728165248.GC66015@isis.sigpipe.cz
Whole thread Raw
In response to Re: Cursor Issue??  ("DracKewl" <bradbudge@hotmail.com>)
Responses Re: Cursor Issue??
List pgsql-general
# bradbudge@hotmail.com / 2005-07-27 12:21:34 -0700:
> 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

    Have you seen the answer to this I sent you in my reply to your
    offlist email? If not, reread the mail. If yes, and you still don't
    see the problem: which part of

    DECLARE name [ BINARY ] [ INSENSITIVE ] [ [ NO ] SCROLL ]
    CURSOR [ { WITH | WITHOUT } HOLD ] FOR query
    [ FOR { READ ONLY | UPDATE [ OF column [, ...] ] } ]

    does allow for "DECLARE curs1 refcursor"? The answer is simple:
    none. You're trying to use a plpgsql declaration outside plpgsql.

--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

pgsql-general by date:

Previous
From: David Fetter
Date:
Subject: Re: How to optimize select count(*)..group by?
Next
From: SCassidy@overlandstorage.com
Date:
Subject: Re: Perl DBI and postgres