pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kumar <sgnerd@yahoo.com.sg>
Cc: psql <pgsql-sql@postgresql.org>
Subject: Re: Unnamed Cursor return
Date: Tue, 02 Sep 2003 10:05:32 -0400
Message-ID: <26740.1062511532@sss.pgh.pa.us> (raw)
In-Reply-To: <020001c37130$dcd632e0$7502a8c0@hdsc.com>
References: <020001c37130$dcd632e0$7502a8c0@hdsc.com>

"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



view thread (2+ messages)

Message-ID: <26740.1062511532@sss.pgh.pa.us>
Permalink:  ../26740.1062511532@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26740.1062511532@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sgnerd@yahoo.com.sg
  Subject: Re: Unnamed Cursor return
  In-Reply-To: <26740.1062511532@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox