Re: Unnamed Cursor return

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kumar" <sgnerd(at)yahoo(dot)com(dot)sg>
Cc: "psql" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Unnamed Cursor return
Date: 2003-09-02 14:05:32
Message-ID: 26740.1062511532@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Kumar" <sgnerd(at)yahoo(dot)com(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Andreas Pflug 2003-09-02 22:51:24 Re: session variable
Previous Message sad 2003-09-02 13:13:24 Re: [BUGS] session variable