Dennis Brakhane wrote on 13.07.2009 21:51:
>> Am I missing something or is the "RETURNING" feature not supported by the
>> driver?
>
> executeUpdate by definitionem can only return an int, the number of
> rows affected.
True, but the JDBC API also defines Statement.getMoreResults() and
Statement.getResultSet() which could be used to return that information
At least executeUpdate() should not throw an exception.
> You probably can use stmt.executeQuery instead
Actually execute() works without throwing an exception, but getMoreResults() and
getResultSet() do not return the information about the deleted rows.
Additionally when using execute(), getUpdateCount() will return -1 even if rows
were deleted.
Thomas