Re: Patch for Statement.getGeneratedKeys()

Поиск
Список
Период
Сортировка
От Ken Johanson
Тема Re: Patch for Statement.getGeneratedKeys()
Дата
Msg-id 478C46D6.7030403@kensystem.com
обсуждение исходный текст
Ответ на Re: Patch for Statement.getGeneratedKeys()  (Kris Jurka <books@ejurka.com>)
Список pgsql-jdbc
>> What are your thoughts on this? Should it be possible/safe going
>> forward to not supply the fully qualified table in the case of:
>>
>> Statement.executeUpdate(String sql, int columnIndexes[])
>>
>> If you can recommend a simpler strategy I will try it. If we can avoid
>> the round trip also that would be great.
>>
>
> Writing "RETURNING *" will return more data than you need, but it has
> the plus of not requiring you to know anything about the underlying
> table columns.  Once the full result is returned you would need to strip
> out only the parts specified in columnIndexes and either create a new
> ResultSet or a wrapper around the returned ResultSet.
>

"RETURNING *" is indeed simpler although based on on real word
experience on slow/congested links or hi transaction volume, and use
cases with large inserts (multi-row, many columns, or LOBs) (
memory/scalability issues), the round trip seems to preferable. I'd
rather muddle though getting that to work (I did already and code to
follow) instead of risking more serious performance issues, if you don't
object.

Ken



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

Предыдущее
От: Ken Johanson
Дата:
Сообщение: Re: Patch for Statement.getGeneratedKeys()
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Patch for Statement.getGeneratedKeys()