handling refcursors
От | Stuart Robinson |
---|---|
Тема | handling refcursors |
Дата | |
Msg-id | Pine.LNX.4.44.0207020044380.25867-100000@www.dreamingamerica.com обсуждение исходный текст |
Ответ на | Re: upgraded from 7.1.3 to 7.2.4 and can't get JDBC to work (Stuart Robinson <stuart@zapata.org>) |
Ответы |
Re: handling refcursors
|
Список | pgsql-jdbc |
I'm trying to use a function that returns a refcursor in a web application. I followed the example code I found at this URL (as suggested on this mailing list): http://fts.postgresql.org/db/mw/msg.html?mid=1354157. I wound up writing this code inside of my base factory class: System.out.println("-- SQL: " + stmt); ps = con.prepareStatement(stmt); ps = bindSelectStmt(ps, obj, selectCase); ResultSet rs = ps.executeQuery(); rs.next(); String cursorName = rs.getString(1); System.out.println("-- CURSOR NAME: " + cursorName); rs = ps.executeQuery("fetch all from " + cursorName); But when I try running that, I get the following output from Tomcat: -- SQL: SELECT get_examples_by_entry_id(?) -- CURSOR NAME: <unnamed cursor 1> java.sql.SQLException: ERROR: parser: parse error at or near "<" I believe the exception is caused by the cursor name, which I know from the system-out to be: <unnamed cursor 1> Any ideas as to what's going on here? Thanks in advance. Regards, Stuart -- Stuart P. Robinson [stuart@zapata.org] 688 Hampshire Street San Francisco, CA 94110 USA
В списке pgsql-jdbc по дате отправления: