Re: How to get generated primary key?

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: Sven Köhler <skoehler(at)upb(dot)de>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: How to get generated primary key?
Date: 2005-02-20 16:48:01
Message-ID: 4218BF41.8090808@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Apparently there is work going on to support sql2003 generated keys.

On the upside you are guaranteed that they truly work now as opposed to
some other db's.

Dave

Kris Jurka wrote:

>On Sat, 19 Feb 2005, [ISO-8859-15] Sven Köhler wrote:
>
>
>
>>i know about the nextval and currval functions, but i don't like them,
>>since they don't apply to tables. To get the generated key, you have to
>>know the name of the sequence, not just the name of the table.
>>
>>
>
>8.0 now offers the pg_get_serial_sequence function which may help you out.
>
>
>
>>Does the JDBC-Driver implement the getGeneratedKeys() method?
>>
>>
>
>No, see the many discussions of this in the archives, for example:
>
>http://gborg.postgresql.org/project/pgjdbc/bugs/bugupdate.php?984
>
>http://archives.postgresql.org/pgsql-jdbc/2004-09/msg00190.php
>
>Kris Jurka
>
>---------------------------(end of broadcast)---------------------------
>TIP 8: explain analyze is your friend
>
>
>
>

--
Dave Cramer
http://www.postgresintl.com
519 939 0336
ICQ#14675561

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Nico 2005-02-21 15:43:49 making a rule and know when it is violated
Previous Message Michael Barker 2005-02-20 01:58:14 [Patch] JDBC3 Blob support