Re: Stored procedures/functions that can return recordsets...

From: Nic Ferrier <nferrier(at)tapsellferrier(dot)co(dot)uk>
To: "Peter Adamek Jr(dot)" <peter(dot)adamek(at)utoronto(dot)ca>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Stored procedures/functions that can return recordsets...
Date: 2002-12-22 23:00:48
Message-ID: 87ptrtr74v.fsf@pooh-sticks-bridge.tapsellferrier.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc

"Peter Adamek Jr." <peter(dot)adamek(at)utoronto(dot)ca> writes:

> I am writing this to see if anyone has been able to successfully run a
> stored procedure (although it is probably still called a function) via
> Java (using a Callable Statement) and have it return a recordset (that
> is multiple columns and multiple rows). If so, I would appreciate it if
> you could post a short example, both of the stored procedure and the
> Java code used to access it.

If you had checked the archives you could have established that this
has not been done yet: it is possible to return record sets to java
code, but not via a CallableStatement.

I have written a patch that allows PostgreSQL to do that.

I'll send it to you if you want.

> I have looked through the 7.3 documentation at the following link, but I
> have not found any references to this functionality.
>
> http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/
>
> I suspect that even in PostgreSQL version 7.3 no such thing as stored
> procedures exist - I suspect it was a misquote and the article is
> referring to functions.

Stored procedures, stored functions... all the same. The generic term
for imperative code executed within the database server is "stored
proc". PostgreSQL's implementation of stored procs can return only one
value.

Nic

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Elphick 2002-12-22 23:23:42 Re: ident auth not working on 7.3.1
Previous Message Oleg Lebedev 2002-12-22 22:21:32 Vectors in Pl/PgSQL

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2002-12-23 07:20:34 Re: updatable (J2EE) resultsets
Previous Message Peter Adamek Jr. 2002-12-22 19:14:39 Stored procedures/functions that can return recordsets...