Re: BUG #1988: keygen not implemented

Поиск
Список
Период
Сортировка
От Mike Clements
Тема Re: BUG #1988: keygen not implemented
Дата
Msg-id 06B12D1D68BCCA4CB1F60BB4EA509768245260@pq-exch01.actional.com
обсуждение исходный текст
Ответ на BUG #1988: keygen not implemented  ("Mike Clements" <mikec@actional.com>)
Список pgsql-bugs
Thanks for the info. I found a workaround by selecting the current value of=
 the sequence after doing the insert. This however is not desirable since i=
t requires another round trip call to the DB, and it requires PostGRE SQL s=
pecific code in my "generic" JDBC client. If the driver supported getGenera=
tedKeys(), client applications could perform better and be truly generic.

Also looking at the release notes I see I'm not the only person asking for =
this feature... Good luck.

> -----Original Message-----
> From: Oliver Jowett [mailto:oliver@opencloud.com]=20
> Sent: Sunday, October 23, 2005 2:24 PM
> To: Mike Clements
> Cc: pgsql-bugs@postgresql.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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Guillaume Smet"
Дата:
Сообщение: BUG #1991: UPPER problem on special characters
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: BUG #1990: Installer bug fails to make C:\program files..global