I created the following function for my postgresql:
CREATE FUNCTION myfunc(param INT) RETURNS VOID AS..
How can I call that function without SELECT?
When I run SELECT myfunc(1) it will work, even though it does not return anything by design.
But I want to run it without the select, just myfunc(1), which does not work and tells me Syntax error at 1.
I'm trying to implement the db_merge function from Insert, on duplicate update in PostgreSQL?.
I cannot run SELECT db_merge(..) from java as this will give me a "A result was returned when none was expected."), PSQLState.TOO_MANY_RESULTS)error.
Statement.execute("select db_merge()")will work just fine. You just can't useexecuteUpdate()because that's not allowed to return something.executeBatch()from statement, which is called byJdbcTemplate.batchUpdate(). So I could probably not use that?JdbcTemplate.execute(String)is designed for DDL statements. docs.spring.io/spring-framework/docs/current/javadoc-api/org/… -- use one of the othersexecute(String, ResultSetExtractor|RowCallbackHandler|RowMapper)& simply discard the results.{call myfunc()}escape, but it just does aSELECTbehind the scenes anyway. I fail to see what the problem with this is.