Re: Possible bug related to primary keys autogeneration - Mailing list pgsql-jdbc

From Vladimir Sitnikov
Subject Re: Possible bug related to primary keys autogeneration
Date
Msg-id CAB=Je-FmGSsf6JyQHeHJj_6ieixZAd_V+bhbPcmRkPdMhqRc1A@mail.gmail.com
Whole thread Raw
In response to Re: Possible bug related to primary keys autogeneration  (Andrea Bergia <a.bergia@list-group.com>)
Responses Re: Possible bug related to primary keys autogeneration  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-jdbc
пт, 15 июл. 2016 г. в 18:07, Andrea Bergia <a.bergia@list-group.com>:

I've noticed that everything works as expected if I use:

connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);


By the way: current pgjdbc returns all the columns in case of Statement.RETURN_GENERATED_KEYS. So be careful when using it with wide tables.
It's better sticking with String[] kind of APIs or filing a PR so "RETURN_GENERATED_KEYS" fetches only keys, not all the columns.
 
Vladimir

pgsql-jdbc by date:

Previous
From: Andrea Bergia
Date:
Subject: Re: Possible bug related to primary keys autogeneration
Next
From: Nicola Zanaga
Date:
Subject: Slow performance updating CLOB data