[
https://issues.apache.org/jira/browse/GROOVY-8155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
John Wagenleitner resolved GROOVY-8155.
---------------------------------------
Resolution: Fixed
Assignee: John Wagenleitner
Fix Version/s: 2.4.11
I was not able to reproduce this on the 2_4_X branch due to [this
commit|https://github.com/apache/groovy/commit/1cb68274537ee26d311b4740eb468aac00728977],
so this should be fixed in the upcoming 2.4.11 release. If you find
otherwise, please re-open this issue.
> No types when executing PostgreSQL stored procedure
> ---------------------------------------------------
>
> Key: GROOVY-8155
> URL: https://issues.apache.org/jira/browse/GROOVY-8155
> Project: Groovy
> Issue Type: Bug
> Components: SQL processing
> Affects Versions: 2.4.9, 2.4.10
> Reporter: Moritz Kobel
> Assignee: John Wagenleitner
> Fix For: 2.4.11
>
>
> Since 2.4.9 I can no longer execute stored procedures:
> The following code causes an exception:
> {code}
> def sql = Sql.newInstance(jdbcUrl,user,pass)
> def result = false
> sql.call('{? = call myproc(?, ?) }', [
> Sql.BOOLEAN,
> Sql.BIGINT(1),
> ], { res ->
> result = res
> })
> {code}
> The exception:
> {code}
> Exception in thread "main" org.postgresql.util.PSQLException: ERROR: function
> myproc(unknown, unknown, unknown) does not exist
> Hint: No function matches the given name and argument types. You might need
> to add explicit type casts.
> {code}
> The exception occurs using 'postgresql:postgresql:9.0-801.jdbc4' and
> 'org.postgresql:postgresql:42.0.0.jre7'
> I assume the following line causes the execution of the procedure before the
> parameters are set
> ({{subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java}} in {{protected
> void setParameters(List<Object> params, PreparedStatement statement)}} ):
> {code}
> ParameterMetaData metaData = statement.getParameterMetaData();
> {code}
> This line is introduced here:
> https://github.com/apache/groovy/pull/495/commits/93f703f53b01a0b0205d8efa364c3efb97758d31#diff-c1c769ea9cf64ea997ca82e512653990R4111
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)