Re: getGeneratedKeys()

Поиск
Список
Период
Сортировка
Искать
От
Marcus Andree S. Magalhaes
Тема
Re: getGeneratedKeys()
Дата
Msg-id
63735.200.174.148.100.1072826901.squirrel@webmail.webnow.com.br
Ответ на
Список
Дерево обсуждения
getGeneratedKeys() Henrik Andersson <henr-and@dsv.su.se>
Re: getGeneratedKeys() Kris Jurka <books@ejurka.com>
Re: getGeneratedKeys() <henr-and@dsv.su.se>
Re: getGeneratedKeys() "John Sidney-Woollett" <johnsw@wardbrook.com>
Re: getGeneratedKeys() <henr-and@dsv.su.se>
Re: getGeneratedKeys() Paul Thomas <paul@tmsl.demon.co.uk>
Re: getGeneratedKeys() <henr-and@dsv.su.se>
Re: getGeneratedKeys() "John Sidney-Woollett" <johnsw@wardbrook.com>
Re: getGeneratedKeys() "Marcus Andree S. Magalhaes" <marcus.magalhaes@vlinfo.com.br>
Re: getGeneratedKeys() "Marcus Andree S. Magalhaes" <marcus.magalhaes@vlinfo.com.br>
Re: getGeneratedKeys() Kris Jurka <books@ejurka.com>

Guys,

I am too dumb or a simple currval() would be useful?
We solved this by sending two queries in JDBC. The first one inserts
a single record in the db. The other issues a currval on the desired
sequence.
There was a posting a few weeks ago, describing a clever method,
issuing both queries on the same connection by using the ";" operator
to separate the queries.
hope this helps.

>> Can you do the insert using a function instead, and return the currval
>> on the underlying sequence?
>>
>> John
>>
>
> I'm not sure what you mean. A stored procedure?
>
> The good thing about getGeneratedKeys() is that you don't have to write
> DB-specific code.
> --
> Henrik
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org



В списке pgsql-jdbc по дате отправления
От:
Дата:
Сообщение: Re: getGeneratedKeys()
От: Paul Thomas
Дата:
Сообщение: Re: getGeneratedKeys()
FAQ