Re: Calling a stored procedure with a custom return type

From: Kris Jurka <books(at)ejurka(dot)com>
To: Brad Larson <bklarson+postgres(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Calling a stored procedure with a custom return type
Date: 2007-10-25 22:47:48
Message-ID: Pine.BSO.4.64.0710251846520.15547@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Thu, 25 Oct 2007, Brad Larson wrote:

> I'm sorry if this is already documented elsewhere; I've googled around
> and searched the jdbc source without any luck. I have a stored
> procedure (PL/pgSQL) which uses a custom return type of the form:
>
> How can I call this from JDBC? I can call it with a
>
> prepareStatement("select login( ?, ?, ?, ? )");
>
> but then the results are all returned as 1 string, of the form "(int,
> string, t, t)", which of course isn't ideal. I also tried

SELECT * FROM login(?,?,?,?);

Kris Jurka

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Guy Rouillier 2007-10-25 23:08:55 Re: multiple connections to db over jsp
Previous Message Kris Jurka 2007-10-25 22:43:59 Re: Potential inconsistency in handling of timestamps