![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Insert a row into the table using: Connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS); The driver throws an exception saying this method is not yet implemented. |
|
What it should do is create the prepared statement so when you execute it, the returned ResultSet has the generated primary key. |
#3
| |||
| |||
|
|
-----Original Message----- From: Oliver Jowett [mailto liver (AT) opencloud (DOT) com]=20Sent: Sunday, October 23, 2005 2:24 PM To: Mike Clements Cc: pgsql-bugs (AT) postgresql (DOT) org Subject: Re: [BUGS] BUG #1988: keygen not implemented =20 Mike Clements wrote: =20 Insert a row into the table using: Connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS); The driver throws an exception saying this method is not=20 yet implemented. =20 This is an optional part of the JDBC spec, and the driver=20 doesn't claim=20 to support it in the metadata it provides=20 (DatabaseMetaData.supportsGetGeneratedKeys() returns false). =20 What it should do is create the prepared statement so when=20 you execute it, the returned ResultSet has the generated primary key. =20 Unfortunately this requires functionality in the backend that=20 does not=20 yet exist (support for "INSERT .. RETURNING ...", or similar). =20 -O =20 =20 |
![]() |
| Thread Tools | |
| Display Modes | |
| |