Re: Multiple Out params in stored procs

From: Fernando Nasser <fnasser(at)redhat(dot)com>
To: MAX <maxim(dot)levesque(at)webhelp(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org, Kim Ho <kho(at)redhat(dot)com>, Aizaz Ahmed <aahmed(at)redhat(dot)com>
Subject: Re: Multiple Out params in stored procs
Date: 2003-06-27 20:12:26
Message-ID: 3EFCA52A.70403@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

MAX wrote:
>
> It appears from the Docs, that pgsql doesn't
> support this is it so ?
>
> I would really like to write a stored proc that
> return multiple OUT parameters to a jdbc CallableStatement...
>

Kim's WIP driver already does that now but the patch hasn't been
submitted yet. How long can you wait?

Note that you will have to define your PostgreSQL functions to
return row types so it must be a 7.3 backend. And you SELECT ... INTO
should say "INTO RESULT" instead of "INTO $1 $2 $3" as in Oracle.

The proper SQL syntax for defining procedures with OUT parameters will
be hopefully available in 7.5 as 7.4 is going into feature freeze and I
haven't even started on that.

We may provide a stand-alone utility to convert an SQL standard proc
definition into the required 7.3 (and 7.4) PostgreSQL function and row
type definitions.

--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser(at)redhat(dot)com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Fernando Nasser 2003-06-27 20:33:39 Re: BIT vs boolean
Previous Message Barry Lind 2003-06-27 20:10:18 Re: ENC: Client_encoding