Re: currval bug??

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: currval bug??
Дата
Msg-id Pine.BSO.4.56.0412211454230.12456@leary.csoft.net
обсуждение исходный текст
Ответ на Re: currval bug??  (Gabriele Carteni <gabriele.carteni@unile.it>)
Список pgsql-jdbc

On Tue, 21 Dec 2004, Gabriele Carteni wrote:

> my problem is to retrieve the last autogenerated key after an insert
> statement. i always used this method (mashing queries together where the
> last is a currval query). What i should use to have the same result in
> pgsql8?
>

Well, as I mentioned in my previous email, I'm not sure if this is an
error in the JDBC driver.  We could conceivably return the first result
found from a combined query like you've shown.  I'm not sure what the code
implications are, but it seems like a reasonable thing to do from an
interface perspective.

To get this working with the current code you will probably have to split
it up into individual queries.  In my previous email I also mentioned that
using Statement.execute() instead of Statement.executeQuery() might work,
but I've not tested it.

Kris Jurka

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

Предыдущее
От: Gabriele Carteni
Дата:
Сообщение: Re: currval bug??
Следующее
От: Jerome Colombie
Дата:
Сообщение: CallableStatement: java.sql.Types=12 however type java.sql.Types=1111 was registered