Stored procedures/functions that can return recordsets...

From: "Peter Adamek Jr(dot)" <peter(dot)adamek(at)utoronto(dot)ca>
To: pgsql-jdbc(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Stored procedures/functions that can return recordsets...
Date: 2002-12-22 19:14:39
Message-ID: 3E060F1F.5070104@utoronto.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc

Hello all,

This email is in regards to the following statement that I found just
last week:

"PostgreSQL 7.3 is full of new, often requested features such as SQL '92
schemas, prepared statements, and stored procedures that can return
record sets."

The statement is part of a larger article and can be found about half
way down the following article:

http://advocacy.postgresql.org/news/2002112801/

I am specifically interested in the portion of the statement that reads
"stored procedures that can return record sets." If this is indeed
true, then I believe that PostgreSQL will become a much more used DB.
This is one aspect that MS SQL Server and Oracle have had for some time
that has been lacking from PostgreSQL (not to mention the Callable
Statement JDBC driver support that is now included in version 7.3).

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.

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.

In any event, I'd like to see this run for my own interest, it's not for
a project. I know what needs to be done in theory, so I'll tinker with
it to try and get it to work on my own. If anyone has any suggestions
or has got this to work and would like to shed light on this, I would
appreciate it.

Thank you kindly,
Pete

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Billy G. Allie 2002-12-22 21:36:25
Previous Message Marc G. Fournier 2002-12-22 19:12:05 v7.3.1 Bundled and Released ...

Browse pgsql-jdbc by date

  From Date Subject
Next Message Nic Ferrier 2002-12-22 23:00:48 Re: Stored procedures/functions that can return recordsets...
Previous Message Tom Lane 2002-12-22 17:12:26 Re: Apparent bug in transaction processing in serializable mode