Re: JDBC driver - is "getGeneratedKeys()" guaranteed to return the ids in the same order a batch insert was made?

From: electrotype <electrotype(at)gmail(dot)com>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: JDBC driver - is "getGeneratedKeys()" guaranteed to return the ids in the same order a batch insert was made?
Date: 2020-12-11 14:36:51
Message-ID: abb4c189-57f5-9d35-13ac-64976349b41b@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

My take is that there is presently no guarantee, and that with current efforts to add parallelism it
is quite probable that observation of such non-orderedness is simply a matter of time. With batching
it seems best to combine its use with single inserts in order to avoid this problem.
>
> David J.
>
I wish that was not the conclusion, but at least it is clear!

Thanks for the help to both of you.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Stephens 2020-12-11 17:24:05 SQL group by help
Previous Message Atul Kumar 2020-12-11 14:31:29 Re: "Required checkpoints occurs too frequently"