Re: Possible bug related to primary keys autogeneration

From: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
To: Andrea Bergia <a(dot)bergia(at)list-group(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Dave Cramer <pg(at)fastcrypt(dot)com>, List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Possible bug related to primary keys autogeneration
Date: 2016-07-15 15:13:11
Message-ID: CAB=Je-FmGSsf6JyQHeHJj_6ieixZAd_V+bhbPcmRkPdMhqRc1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

пт, 15 июл. 2016 г. в 18:07, Andrea Bergia <a(dot)bergia(at)list-group(dot)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

>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Nicola Zanaga 2016-07-17 09:39:14 Slow performance updating CLOB data
Previous Message Andrea Bergia 2016-07-15 15:06:04 Re: Possible bug related to primary keys autogeneration