Skip site navigation (1) Skip section navigation (2)

Support of getting generated keys in driver version 8.4devel

From: Miłosz Tylenda <mtylenda(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Support of getting generated keys in driver version 8.4devel
Date: 2008-12-31 12:19:23
Message-ID: 802b0da7-3575-46ea-bf26-8ecc5eb50fef@p2g2000prf.googlegroups.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Hello!

This is my environment:
Driver version: PostgreSQL 8.4devel JDBC3 (build 700)
PostgreSQL version: 8.3.4

I am looking for getting generated keys support in the driver. The
changelog says it has basic generated keys support. However,
DatabaseMetaData.supportsGetGeneratedKeys() returns false and when I
execute:

con.prepareStatement("insert into tab0 values(default, 444)", new
String[] {"id"});

I am receiving:

Caused by: org.postgresql.util.PSQLException: Returning autogenerated
keys is not supported.
	at org.postgresql.jdbc3.AbstractJdbc3Connection.prepareStatement
(AbstractJdbc3Connection.java:448)

Am I missing something? If not, is the generated keys support going to
be implemented in a future build of 8.4devel?

Happy New Year,
Milosz

Responses

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2008-12-31 19:29:51
Subject: Re: Support of getting generated keys in driver version 8.4devel
Previous:From: Eric DaviesDate: 2008-12-30 22:26:54
Subject: Re: Trying to insert an array using a prepared statement.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group