Affects: \
Only procedure column out
resolves to the SqlOutParameter. No mention of function column out
. Causes issues with pgjdbc driver from version 42.2.11+ and for Postgres server 11+.
if (meta.getParameterType() == DatabaseMetaData.procedureColumnOut) {
Comment From: snicoll
@hladysz thanks for the report. Can you share a small sample that demonstrates the issue you've described? You can attach a zip to this issue or push the code to a separate GitHub repository.
Comment From: hladysz
No time atm but got a piece of code used:
private SimpleJdbcCall prepareClearingCall;
private void initialiseCalls() {
prepareClearingCall = new SimpleJdbcCall(jdbcTemplate)
.withProcedureName("test_function");
}
public void call() {
Map<String, Object> procedureResult = prepareClearingCall.execute();
}
CREATE OR REPLACE FUNCTION public.test_function(
OUT __result integer,
OUT __result_message varchar
)
RETURNS record
LANGUAGE plpgsql
AS
$function$
BEGIN
__result = 0;
__result_message = 'OK';
END;
$function$;
Comment From: snicoll
See also #25399
Comment From: jhoeller
Related to #25588, this requires a similar function-specific check there since the JDBC constant values are unfortunately different.