From: Jeremy Whiting <jwhiting@redhat.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Return Codes of BatchUpdateException in PostgreSql 9.6
Date: Fri, 14 Oct 2016 11:18:24 +0100
Message-ID: <64d5a53b-97a4-6e96-03af-2ab818bfa4cd@redhat.com> (raw)
In-Reply-To: <63578883.319462.1476435530742@mail.yahoo.com>
References: <63578883.319462.1476435530742.ref@mail.yahoo.com>
<63578883.319462.1476435530742@mail.yahoo.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
Hi,
Comments in-line....
On 14/10/16 09:58, Tillmann Schulz wrote:
> Hello,
>
> I made some test with different driver versions. The result seems to be that it is an issue in the newer driver versions and not in the postgresql database
>
>
> Postgres 9.5.0 with postgresql-jdbc41-9.4-1201.jar contains only updateCounts of first succeeded statements.
>
> ---------------------------------------------------------------------------------------------------------------
>
> updateCounts[0]=1
> updateCounts[1]=1
> updateCounts[2]=1
> updateCounts[3]=1
> updateCounts[4]=1
> -->correct
The value 1 is the batched statement return code for
j.s.Statement.SUCCESS_NO_INFO
>
>
> Postgres 9.6.0 with postgresql-jdbc41-9.4-1201.jar contains only updateCounts of first succeeded statements.
> ---------------------------------------------------------------------------------------------------------------
> updateCounts[0]=1
> updateCounts[1]=1
> updateCounts[2]=1
> updateCounts[3]=1
> updateCounts[4]=1
> -->correct but can't use this driver with postgressql 9.6
>
See above.
>
> Postgres 9.6.0 with postgresql-jdbc41-9.4-1211.jar contains updateCounts of all elements.
>
> ---------------------------------------------------------------------------------------------------------------
> updateCounts[0]=-3
> updateCounts[1]=-3
> updateCounts[2]=-3
> updateCounts[3]=-3
> updateCounts[4]=-3
> updateCounts[5]=-3
> updateCounts[6]=-3
> updateCounts[7]=-3
> updateCounts[8]=-3
> updateCounts[9]=-3
> -->Wrong.updateCounts[0..4] and updateCounts[6..9] contains wrong information.
>
>
>
>> will need to set logLevel=2
> How can I set the logLevel. Is it in postgresql.conf?
logLevel is a connection property.
With that enabled you can expect to see lots of low level protocol
logging. Exposing driver (FE) to back end (BE) and responses (BE -> FE).
It is the BE->FE that is helpful in this case.
Regards,
Jeremy
>
> Bye,
>
> Tillmann
>
>
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: jwhiting@redhat.com
Subject: Re: Return Codes of BatchUpdateException in PostgreSql 9.6
In-Reply-To: <64d5a53b-97a4-6e96-03af-2ab818bfa4cd@redhat.com>
References: <63578883.319462.1476435530742.ref@mail.yahoo.com> <63578883.319462.1476435530742@mail.yahoo.com> <64d5a53b-97a4-6e96-03af-2ab818bfa4cd@redhat.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox