Re: Make procedure OUT parameters work with JDBC

From: Craig Ringer <craig(dot)ringer(at)enterprisedb(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Make procedure OUT parameters work with JDBC
Date: 2020-10-20 00:35:56
Message-ID: CAGRY4nwcryGTthVf+wkF2oOt1jktH-gdf-7s8M-OCVzOP+vcFw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 19 Oct 2020, 19:16 Andrew Dunstan, <andrew(at)dunslane(dot)net> wrote:

>
> On 10/19/20 5:19 AM, Peter Eisentraut wrote:
> > A follow-up to the recently added support for OUT parameters for
> > procedures. The JDBC driver sends OUT parameters with type void.
> > This makes sense when calling a function, so that the parameters are
> > ignored in ParseFuncOrColumn(). For a procedure call we want to treat
> > them as unknown. This is of course a bit of a hack on top of another
> > hack, but it's small and contained and gets the job done.
> >
>

The JDBC spec defines CallableStatement.registerOutPararameter(...)
variants that take SQLType enumeration value and optionally type name.

It's important that this change not break correct and fully specified use
of the CallableStatement interface.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2020-10-20 01:29:27 Reduce the dependence on access/xlog_internal.h
Previous Message Andres Freund 2020-10-19 23:32:34 Re: Hash support for row types