Re: getGeneratedKeys()

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Jamie Deppeler <jamie(at)doitonce(dot)net(dot)au>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: getGeneratedKeys()
Date: 2005-04-01 00:33:31
Message-ID: 1112315611.30190.22.camel@jd2.commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

On Fri, 2005-04-01 at 10:05 +1000, Jamie Deppeler wrote:
> Hi to all,
>
> I have one problem with PostgreSQL and Java. I have a table with Primary
> key(serial) field, but after I insert a record i am unable to retrieve
> this value. I have tried getGeneratedKeys() and i get nothing returned.

I am not a Java programmer but normally I would use select currval
('sequencename');

>
> There is another method to retrieve this field?
>
> thanks
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
--
Command Prompt, Inc., Your PostgreSQL solutions company. 503-667-4564
Custom programming, 24x7 support, managed services, and hosting
Open Source Authors: plPHP, pgManage, Co-Authors: plPerlNG
Reliable replication, Mammoth Replicator - http://www.commandprompt.com/

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Qingqing Zhou 2005-04-01 01:50:49 Re: [ADMIN] Excessive growth of pg_attribute and other system tables
Previous Message Simon Riggs 2005-04-01 00:29:58 Re: Online Backups with 8.0 -- Confused

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Chambers 2005-04-01 00:46:02 your thoughts on a crazy idea please
Previous Message Jamie Deppeler 2005-04-01 00:05:59 getGeneratedKeys()