Re: currval bug??

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


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
Дата:
FAQ