Thread: JDBC-Question

JDBC-Question

From
Erwin Ambrosch
Date:
Hi,

I wonder what happens if an application performs the following.

Lets say I have a table named user with 1000 rows.  The application executest
the following.

Connection con = getConnterion();
Statement stmt = con.createStatement();
ResultSet rset = stmt.executesQuery("SELECT * FORM users");

Do I have all the data (1000 rows) in memory or dose the driver fetch the
data as needed (while iterating over the rset instance) from my postgresql
backend.

Thanks in advance
Erwin

Last Inserted row.

From
"Kris Zawadka"
Date:
I'm sure this must have been covered before but the search engine for
the mailing list is currently down and I couldn't find any help on the
web.

I would like to know if it's possible to return a data set after an
insert.  In MS SQL it's quite easy to create a trigger that return's
information about the inserted record such as primary ID and so forth.
Using a Function & Trigger I can return the information with RAISE but
obviously PHP or any other language won't treat that as a row from a
result set.

I wish to perform this task at the trigger/function level for
abstraction reasons and want to avoid having to multiple select
statements for something that should be easily done in one.

Thanks for your help,

Kris Zawadka