You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm submitting a question regarding stored procedure OUT parameters
[ X] bug report
feature request
Describe the issue
I am trying to call a stored procedure with multiple OUT parameters, But I am getting below error
"This statement does not declare an OUT parameter. Use '{' ?= call ... '}' to declare one."
Are OUT parameters supported for stored procedures or they have to be functions ?
Driver Version? 42.2.9
Java Version? 10.0.2
OS Version? Mac
PostgreSQL Version? 11.5
To Reproduce
Steps to reproduce the behaviour:
PROC = "CALL filter(filterid=>?, code=>?, cursor=>?, row_no=> ?)"
The first two are IN parameters
Last two are OUT parameters
callableStatement.registerOutParameter(3, Types.OTHER)
The above throws this error
"This statement does not declare an OUT parameter. Use '{' ?= call ... '}' to declare one."
Expected behaviour
When I wrap the sql with { } it thinks that it is function and I get an error saying, No such function.
Logs
org.postgresql.util.PSQLException: This statement does not declare an OUT parameter. Use { ?= call ... } to declare one.
at org.postgresql.jdbc.PgCallableStatement.registerOutParameter(PgCallableStatement.java:205)
The text was updated successfully, but these errors were encountered:
I'm submitting a question regarding stored procedure OUT parameters
Describe the issue
I am trying to call a stored procedure with multiple OUT parameters, But I am getting below error
"This statement does not declare an OUT parameter. Use '{' ?= call ... '}' to declare one."
Are OUT parameters supported for stored procedures or they have to be functions ?
Driver Version? 42.2.9
Java Version? 10.0.2
OS Version? Mac
PostgreSQL Version? 11.5
To Reproduce
Steps to reproduce the behaviour:
PROC = "CALL filter(filterid=>?, code=>?, cursor=>?, row_no=> ?)"
The first two are IN parameters
Last two are OUT parameters
callableStatement.registerOutParameter(3, Types.OTHER)
The above throws this error
"This statement does not declare an OUT parameter. Use '{' ?= call ... '}' to declare one."
Expected behaviour
When I wrap the sql with { } it thinks that it is function and I get an error saying, No such function.
Logs
org.postgresql.util.PSQLException: This statement does not declare an OUT parameter. Use { ?= call ... } to declare one.
at org.postgresql.jdbc.PgCallableStatement.registerOutParameter(PgCallableStatement.java:205)
The text was updated successfully, but these errors were encountered: