Re: Unnamed Cursor return - Mailing list pgsql-sql

From Tom Lane
Subject Re: Unnamed Cursor return
Date
Msg-id 26740.1062511532@sss.pgh.pa.us
Whole thread Raw
In response to Unnamed Cursor return  ("Kumar" <sgnerd@yahoo.com.sg>)
List pgsql-sql
"Kumar" <sgnerd@yahoo.com.sg> writes:
> (1) pls have a look in the function, that I have named the cursor as ref1, =
> but again it is returning a unnamed cursor?

This is not a bug.  See the "returning cursors" section of the plpgsql
manual.  (IIRC, you can also create a named cursor by binding the cursor
in DECLARE.)

> (2) How to fetch the content of the unnamed cursor at PgAdmin and at Comman=
> d prompt?

You probably need a BEGIN block in the psql case.  Can't help you with
pgadmin.
        regards, tom lane


pgsql-sql by date:

Previous
From: sad
Date:
Subject: Re: [BUGS] session variable
Next
From: Michał Wróblewski (Muerte)
Date:
Subject: Like phrase