Re: Order of generated keys during inserts - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: Order of generated keys during inserts
Date
Msg-id CADK3HH+=3wD5qu86yYKevpfm5BTvuxypd_GW9cATsRfC_1=gNg@mail.gmail.com
Whole thread Raw
In response to Order of generated keys during inserts  (Andrei Tsibets <andreit@geomotiv.com>)
List pgsql-jdbc


On Wed, 16 Oct 2019 at 20:26, Andrei Tsibets <andreit@geomotiv.com> wrote:
Hello,

I’m doing multiple inserts into PostgreSQL using executeBatch, and then retrieving generated primary keys via getGeneratedKeys().
The question is: is it save to match inserts with retuned keys by order? Is it guaranteed that generated keys are ordered according
to the order in which commands were added to the batch?

They should be but we make no such guarantee.



pgsql-jdbc by date:

Previous
From: Andrei Tsibets
Date:
Subject: Order of generated keys during inserts
Next
From: Árpád Magosányi
Date:
Subject: [pgjdbc/pgjdbc] 635cc8: fix documentation on generating the pk8 key.close...