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

From electrotype
Subject Re: JDBC driver - is "getGeneratedKeys()" guaranteed to return the ids in the same order a batch insert was made?
Date
Msg-id abb4c189-57f5-9d35-13ac-64976349b41b@gmail.com
Whole thread Raw
In response to Re: JDBC driver - is "getGeneratedKeys()" guaranteed to return the ids in the same order a batch insert was made?  ("David G. Johnston" <david.g.johnston@gmail.com>)
List 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.

pgsql-general by date:

Previous
From: Atul Kumar
Date:
Subject: Re: "Required checkpoints occurs too frequently"
Next
From: Chris Stephens
Date:
Subject: SQL group by help