![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
On Tue, 19 Oct 2004, federico wrote: i saw in bug 1201 that some got my problem [ you can't do "SELECT * FROM func_returning_void();" ] This patch seems to fix it, although I have no idea what the actual implications are, I just changed any place that produced an error. |
#3
| |||
| |||
|
|
Huh, shouldn't the user rather do SELECT func_returning_void(); |
#4
| |||
| |||
|
|
On Tue, 19 Oct 2004, Alvaro Herrera wrote: Huh, shouldn't the user rather do SELECT func_returning_void(); The problem is that the function may actually be a SRF so the JDBC driver transforms to the "SELECT * FROM" form. |
#5
| |||
| |||
|
|
i saw in bug 1201 that some got my problem i detail it i have a function that returns a void CREATE OR REPLACE FUNCTION myFunction(int2, int2) RETURNS void AS $BODY$ UPDATE table SET field1 = $1 WHERE field2 = $2; $BODY$ LANGUAGE 'sql' VOLATILE; when i execute it with a callablestatement CallableStatement cstm = conn.prepareCall({ call myFunction(CAST(? AS INT2), CAST(? AS INT2)) }); cstm.setInt(1, aValue.getValue()); cstm.setInt(2, anotherValue.getValue()); i got the following error org.postgresql.util.PSQLException: ERROR: function "jcpo_setallusersbyissuemessagestatus" in FROM has unsupported return type at org.postgresql.util.PSQLException.parseServerError (PSQLException.java:139) at org.postgresql.core.QueryExecutor.executeV3(QueryE xecutor.java:152) at org.postgresql.core.QueryExecutor.execute(QueryExe cutor.java:100) at org.postgresql.core.QueryExecutor.execute(QueryExe cutor.java:43) at org.postgresql.jdbc1.AbstractJdbc1Statement.execut e(AbstractJdbc1Statement.java:517) at org.postgresql.jdbc2.AbstractJdbc2Statement.execut e(AbstractJdbc2Statement.java:50) any news about it? i'm using PostgreSQL Database Server 8.0-beta2-dev3 on Windows and pgdev.307.jdbc3.jar drivers thank you federico ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings |
![]() |
| Thread Tools | |
| Display Modes | |
| |