How do you batch insert and still obtain identity?

Поиск
Список
Период
Сортировка
От Robert Nicholson
Тема How do you batch insert and still obtain identity?
Дата
Msg-id 847CAC0D-29A7-472F-9DF1-D4B657BAAD75@gmail.com
обсуждение исходный текст
Список pgsql-jdbc
So, when you make use of Serial, or Autoincrement fields how is it
possible to insert in a batch update and then learn the identity of
the rows you should inserted?

Is it my understanding that when you want to do bulk inserts thru
batch update that you are required to provide the primary keys having
called a sequence or obtained them
before hand since there's no way int he result of an update to obtain
the identity of the rows you've just inserted. It is puzzling to me
that JDBC doesn't allow you to do this
given that it can tell you which statement (by index) succeeded or
failed.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Compression
Следующее
От: Ying-Wen Chen
Дата:
Сообщение: callable statement cannot work when call stored procedure @postgres84