JDBC and fetching the OID of an insert

Поиск
Список
Период
Сортировка
От Michael Paesold
Тема JDBC and fetching the OID of an insert
Дата
Msg-id 01e601c25f18$68f49b30$4201a8c0@beeblebrox
обсуждение исходный текст
Ответ на JDBC API Tests  (Al Sutton <al@alsutton.com>)
Ответы Re: JDBC and fetching the OID of an insert
Список pgsql-jdbc
Hi,

Does anyone of you know, how to get the OID of the just inserted Row after
stmt.executeUpdate("INSERT... ")? I hope this is possible at all!

If it's not, I would be willing to implement getGeneratedKeys() to return at
least the OID of an insert. Assuming that would be possible and exceptable?

(Btw. am I correct that the only way to get a value for a sequence via JDBC
is to "SELECT currval('...')" resp. "SELECT nextval('...')"?)


Best Regards,
Michael


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Patch for handling "autocommit=false" in postgresql.conf
Следующее
От: Daryl Beattie
Дата:
Сообщение: Re: JDBC and fetching the OID of an insert