Re: Stored Functions - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: Stored Functions
Date
Msg-id 1062147108.1594.28.camel@localhost.localdomain
Whole thread Raw
In response to Stored Functions  ("Yolanda Phillips" <yphillips@dlkconsulting.co.za>)
List pgsql-jdbc
You need to call curval('sequencename') to get the last id

Dave
On Fri, 2003-08-29 at 04:29, Yolanda Phillips wrote:
> Good day,
>
> Thanks to Barry Lind's response, I am now able to successfully use stored
> functions with JDBC.
>
> However, I've searched the archives and the doc's, but unable to find a
> solution to the following:
>
> I'm wanting to do an insert, then if it was successfull the function should
> return the id. This id is using a sequence.nextval(). How do I return the
> new id?
>
> Help in the right direction will be appreciated.
>
>
> Sincerely,
>
>
> Yolanda Phillips
> Web Applications Developer
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
--
Dave Cramer <Dave@micro-automation.net>


pgsql-jdbc by date:

Previous
From: Anders Hermansen
Date:
Subject: Re: Stored Functions
Next
From: Johann Uhrmann
Date:
Subject: Re: Callbacks for NOTIFY