Re: stored procedure returning result set.

From: Kris Jurka <books(at)ejurka(dot)com>
To: "Gohil, Hemant" <HGohil(at)dylt(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: stored procedure returning result set.
Date: 2008-09-23 22:21:12
Message-ID: Pine.BSO.4.64.0809231809160.6259@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Tue, 23 Sep 2008, Gohil, Hemant wrote:

> Thank you very much for links. I was able to create the function fine.
> If it is not for asking too much - how would I display actual results
> from the cursor using SQL clients like Aqua Data Studio or SQuirreL SQL
> Client ?

I'm not familiar with either of those clients, but here's how you would do
it in psql using the function definition from example 6.3 of the
documentation I pointed you to.

jurka=# begin;
BEGIN
jurka=# select refcursorfunc();
refcursorfunc
--------------------
<unnamed portal 1>
(1 row)

jurka=# fetch all from "<unnamed portal 1>";
?column?
----------
1
2
(2 rows)

Kris Jurka

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Matt Magoffin 2008-09-24 01:56:18 very large result sets and ResultSet.relative() to jump to a desired offset
Previous Message Gohil, Hemant 2008-09-23 22:05:09 Re: stored procedure returning result set.