pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tillmann Schulz <tillmann73@yahoo.de>
To: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: Return Codes of BatchUpdateException in PostgreSql 9.6
Date: Fri, 14 Oct 2016 12:15:31 +0000 (UTC)
Message-ID: <109470434.726210.1476447331901@mail.yahoo.com> (raw)
References: <109470434.726210.1476447331901.ref@mail.yahoo.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

Hello, 


>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.

thanks for the quick answer.


Here are the logs (see also http://pastebin.com/g6k46UEU)

Thanks

Tillmann


=========================================================================================================================================================================================================================
POSTGRES 9.5 logs
=========================================================================================================================================================================================================================
DriverManager.getConnection("jdbc:postgresql://localhost:9432/app5?charSet=UTF-8&user=xxxx&password=xxx&logLevel=2&loglevel=2")
trying org.postgresql.Driver
13:56:08.389 (1) PostgreSQL 9.4 JDBC4.1 (build 1201)
13:56:08.398 (1) Trying to establish a protocol version 3 connection to localhost:9432
13:56:08.427 (1) Receive Buffer Size is 8192
13:56:08.427 (1) Send Buffer Size is 8192
13:56:08.429 (1)  FE=> StartupPacket(user=, database=app, client_encoding=UTF8, DateStyle=ISO, TimeZone=Europe/Berlin, extra_float_digits=2)
13:56:08.534 (1)  <=BE AuthenticationReqMD5(salt=f9d204ba)
13:56:08.541 (1)  FE=> Password(md5digest=md50d3fabec1f2d6d281c23820d1fa25c8e)
13:56:08.546 (1)  <=BE AuthenticationOk
13:56:08.556 (1)  <=BE NoticeResponse(DEBUG: CommitTransaction)
SQLWarning: 
13:56:08.556 (1)  <=BE NoticeResponse(DEBUG: name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: )
SQLWarning: 
13:56:08.556 (1)  <=BE ParameterStatus(application_name = )
13:56:08.556 (1)  <=BE ParameterStatus(client_encoding = UTF8)
13:56:08.556 (1)  <=BE ParameterStatus(DateStyle = ISO, DMY)
13:56:08.556 (1)  <=BE ParameterStatus(integer_datetimes = on)
13:56:08.556 (1)  <=BE ParameterStatus(IntervalStyle = postgres)
13:56:08.556 (1)  <=BE ParameterStatus(is_superuser = on)
13:56:08.556 (1)  <=BE ParameterStatus(server_encoding = UTF8)
13:56:08.556 (1)  <=BE ParameterStatus(server_version = 9.5.0)
13:56:08.557 (1)  <=BE ParameterStatus(session_authorization = xxxx)
13:56:08.557 (1)  <=BE ParameterStatus(standard_conforming_strings = on)
13:56:08.557 (1)  <=BE ParameterStatus(TimeZone = Europe/Berlin)
13:56:08.557 (1)  <=BE BackendKeyData(pid=14144,ckey=2078122563)
13:56:08.557 (1)  <=BE ReadyForQuery(I)
13:56:08.560 (1) simple execute, handler=org.postgresql.core.SetupQueryRunner$SimpleResultHandler@36aa7bc2, maxRows=0, fetchSize=0, flags=23
13:56:08.561 (1)  FE=> Parse(stmt=null,query="SET extra_float_digits = 3",oids={})
13:56:08.562 (1)  FE=> Bind(stmt=null,portal=null)
13:56:08.562 (1)  FE=> Execute(portal=null,limit=1)
13:56:08.562 (1)  FE=> Sync
13:56:08.562 (1)  <=BE NoticeResponse(DEBUG: Parsen <unnamed>: SET extra_float_digits = 3)
SQLWarning: 
13:56:08.562 (1)  <=BE NoticeResponse(DEBUG: StartTransactionCommand)
SQLWarning: 
13:56:08.562 (1)  <=BE NoticeResponse(DEBUG: StartTransaction)
SQLWarning: 
13:56:08.562 (1)  <=BE NoticeResponse(DEBUG: name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: )
SQLWarning: 
13:56:08.563 (1)  <=BE ParseComplete [null]
13:56:08.563 (1)  <=BE NoticeResponse(DEBUG: Binden <unnamed> an <unnamed>)
SQLWarning: 
13:56:08.563 (1)  <=BE BindComplete [null]
13:56:08.563 (1)  <=BE NoticeResponse(DEBUG: ProcessUtility)
SQLWarning: 
13:56:08.563 (1)  <=BE CommandStatus(SET)
13:56:08.563 (1)  <=BE NoticeResponse(DEBUG: CommitTransactionCommand)
SQLWarning: 
13:56:08.564 (1)  <=BE NoticeResponse(DEBUG: CommitTransaction)
SQLWarning: 
13:56:08.564 (1)  <=BE NoticeResponse(DEBUG: name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: )
SQLWarning: 
13:56:08.564 (1)  <=BE ReadyForQuery(I)
13:56:08.565 (1)     compatible = 90400
13:56:08.565 (1)     loglevel = 2
13:56:08.565 (1)     prepare threshold = 5
13:56:08.567 (1)     types using binary send = TIMESTAMPTZ,UUID,INT2_ARRAY,INT4_ARRAY,BYTEA,TEXT_ARRAY,TIMETZ,INT8,INT2,INT4,VARCHAR_ARRAY,INT8_ARRAY,POINT,TIMESTAMP,TIME,BOX,FLOAT4,FLOAT8,FLOAT4_ARRAY,FLOAT8_ARRAY
13:56:08.568 (1)     types using binary receive = TIMESTAMPTZ,UUID,INT2_ARRAY,INT4_ARRAY,BYTEA,TEXT_ARRAY,TIMETZ,INT8,INT2,INT4,VARCHAR_ARRAY,INT8_ARRAY,POINT,DATE,TIMESTAMP,TIME,BOX,FLOAT4,FLOAT8,FLOAT4_ARRAY,FLOAT8_ARRAY
13:56:08.568 (1)     integer date/time = true
getConnection returning org.postgresql.Driver
13:56:08.587 (1) batch execute 10 queries, handler=org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler@2a33fae0, maxRows=0, fetchSize=0, flags=5
13:56:08.587 (1)  FE=> Parse(stmt=null,query="BEGIN",oids={})
13:56:08.587 (1)  FE=> Bind(stmt=null,portal=null)
13:56:08.587 (1)  FE=> Execute(portal=null,limit=0)
13:56:08.588 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('0')",oids={})
13:56:08.588 (1)  FE=> Bind(stmt=null,portal=null)
13:56:08.588 (1)  FE=> Describe(portal=null)
13:56:08.588 (1)  FE=> Execute(portal=null,limit=1)
13:56:08.588 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('1')",oids={})
13:56:08.588 (1)  FE=> Bind(stmt=null,portal=null)
13:56:08.588 (1)  FE=> Describe(portal=null)
13:56:08.588 (1)  FE=> Execute(portal=null,limit=1)
13:56:08.588 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('2')",oids={})
13:56:08.588 (1)  FE=> Bind(stmt=null,portal=null)
13:56:08.588 (1)  FE=> Describe(portal=null)
13:56:08.588 (1)  FE=> Execute(portal=null,limit=1)
13:56:08.589 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('3')",oids={})
13:56:08.589 (1)  FE=> Bind(stmt=null,portal=null)
13:56:08.589 (1)  FE=> Describe(portal=null)
13:56:08.589 (1)  FE=> Execute(portal=null,limit=1)
13:56:08.589 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('4')",oids={})
13:56:08.589 (1)  FE=> Bind(stmt=null,portal=null)
13:56:08.589 (1)  FE=> Describe(portal=null)
13:56:08.589 (1)  FE=> Execute(portal=null,limit=1)
13:56:08.589 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('5')",oids={})
13:56:08.589 (1)  FE=> Bind(stmt=null,portal=null)
13:56:08.589 (1)  FE=> Describe(portal=null)
13:56:08.589 (1)  FE=> Execute(portal=null,limit=1)
13:56:08.589 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('6')",oids={})
13:56:08.589 (1)  FE=> Bind(stmt=null,portal=null)
13:56:08.589 (1)  FE=> Describe(portal=null)
13:56:08.589 (1)  FE=> Execute(portal=null,limit=1)
13:56:08.589 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('7')",oids={})
13:56:08.589 (1)  FE=> Bind(stmt=null,portal=null)
13:56:08.590 (1)  FE=> Describe(portal=null)
13:56:08.590 (1)  FE=> Execute(portal=null,limit=1)
13:56:08.590 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('8')",oids={})
13:56:08.590 (1)  FE=> Bind(stmt=null,portal=null)
13:56:08.590 (1)  FE=> Describe(portal=null)
13:56:08.590 (1)  FE=> Execute(portal=null,limit=1)
13:56:08.590 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('9')",oids={})
13:56:08.590 (1)  FE=> Bind(stmt=null,portal=null)
13:56:08.590 (1)  FE=> Describe(portal=null)
13:56:08.590 (1)  FE=> Execute(portal=null,limit=1)
13:56:08.590 (1)  FE=> Sync
13:56:08.591 (1)  <=BE NoticeResponse(DEBUG: Parsen <unnamed>: BEGIN)
SQLWarning: 
13:56:08.591 (1)  <=BE NoticeResponse(DEBUG: StartTransactionCommand)
SQLWarning: 
13:56:08.591 (1)  <=BE NoticeResponse(DEBUG: StartTransaction)
SQLWarning: 
13:56:08.591 (1)  <=BE NoticeResponse(DEBUG: name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: )
SQLWarning: 
13:56:08.593 (1)  <=BE ParseComplete [null]
13:56:08.593 (1)  <=BE NoticeResponse(DEBUG: Binden <unnamed> an <unnamed>)
SQLWarning: 
13:56:08.594 (1)  <=BE BindComplete [null]
13:56:08.594 (1)  <=BE NoticeResponse(DEBUG: ProcessUtility)
SQLWarning: 
13:56:08.594 (1)  <=BE NoticeResponse(DEBUG: CommitTransactionCommand)
SQLWarning: 
13:56:08.594 (1)  <=BE CommandStatus(BEGIN)
13:56:08.594 (1)  <=BE NoticeResponse(DEBUG: Parsen <unnamed>: INSERT INTO TESTTABLE VALUES('0'))
SQLWarning: 
13:56:08.594 (1)  <=BE NoticeResponse(DEBUG: StartTransactionCommand)
SQLWarning: 
13:56:08.594 (1)  <=BE ParseComplete [null]
13:56:08.594 (1)  <=BE NoticeResponse(DEBUG: Binden <unnamed> an <unnamed>)
SQLWarning: 
13:56:08.594 (1)  <=BE BindComplete [null]
13:56:08.594 (1)  <=BE NoData
13:56:08.594 (1)  <=BE NoticeResponse(DEBUG: ProcessQuery)
SQLWarning: 
13:56:08.596 (1)  <=BE NoticeResponse(DEBUG: mapped win32 error code 2 to 2)
SQLWarning: 
13:56:08.600 (1)  <=BE CommandStatus(INSERT 0 1)
13:56:08.601 (1)  <=BE NoticeResponse(DEBUG: Parsen <unnamed>: INSERT INTO TESTTABLE VALUES('1'))
SQLWarning: 
13:56:08.601 (1)  <=BE ParseComplete [null]
13:56:08.601 (1)  <=BE NoticeResponse(DEBUG: Binden <unnamed> an <unnamed>)
SQLWarning: 
13:56:08.601 (1)  <=BE BindComplete [null]
13:56:08.601 (1)  <=BE NoData
13:56:08.601 (1)  <=BE NoticeResponse(DEBUG: ProcessQuery)
SQLWarning: 
13:56:08.601 (1)  <=BE CommandStatus(INSERT 0 1)
13:56:08.601 (1)  <=BE NoticeResponse(DEBUG: Parsen <unnamed>: INSERT INTO TESTTABLE VALUES('2'))
SQLWarning: 
13:56:08.601 (1)  <=BE ParseComplete [null]
13:56:08.601 (1)  <=BE NoticeResponse(DEBUG: Binden <unnamed> an <unnamed>)
SQLWarning: 
13:56:08.601 (1)  <=BE BindComplete [null]
13:56:08.601 (1)  <=BE NoData
13:56:08.601 (1)  <=BE NoticeResponse(DEBUG: ProcessQuery)
SQLWarning: 
13:56:08.601 (1)  <=BE CommandStatus(INSERT 0 1)
13:56:08.601 (1)  <=BE NoticeResponse(DEBUG: Parsen <unnamed>: INSERT INTO TESTTABLE VALUES('3'))
SQLWarning: 
13:56:08.601 (1)  <=BE ParseComplete [null]
13:56:08.601 (1)  <=BE NoticeResponse(DEBUG: Binden <unnamed> an <unnamed>)
SQLWarning: 
13:56:08.602 (1)  <=BE BindComplete [null]
13:56:08.602 (1)  <=BE NoData
13:56:08.602 (1)  <=BE NoticeResponse(DEBUG: ProcessQuery)
SQLWarning: 
13:56:08.602 (1)  <=BE CommandStatus(INSERT 0 1)
13:56:08.602 (1)  <=BE NoticeResponse(DEBUG: Parsen <unnamed>: INSERT INTO TESTTABLE VALUES('4'))
SQLWarning: 
13:56:08.602 (1)  <=BE ParseComplete [null]
13:56:08.602 (1)  <=BE NoticeResponse(DEBUG: Binden <unnamed> an <unnamed>)
SQLWarning: 
13:56:08.602 (1)  <=BE BindComplete [null]
13:56:08.602 (1)  <=BE NoData
13:56:08.602 (1)  <=BE NoticeResponse(DEBUG: ProcessQuery)
SQLWarning: 
13:56:08.602 (1)  <=BE CommandStatus(INSERT 0 1)
13:56:08.602 (1)  <=BE NoticeResponse(DEBUG: Parsen <unnamed>: INSERT INTO TESTTABLE VALUES('5'))
SQLWarning: 
13:56:08.602 (1)  <=BE ParseComplete [null]
13:56:08.602 (1)  <=BE NoticeResponse(DEBUG: Binden <unnamed> an <unnamed>)
SQLWarning: 
13:56:08.602 (1)  <=BE BindComplete [null]
13:56:08.603 (1)  <=BE NoData
13:56:08.603 (1)  <=BE NoticeResponse(DEBUG: ProcessQuery)
SQLWarning: 
13:56:08.608 (1)  <=BE ErrorMessage(FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint „testtable_pkey“
Detail: Schlüssel „(id)=(5)“ existiert bereits.)
org.postgresql.util.PSQLException: FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint „testtable_pkey“
Detail: Schlüssel „(id)=(5)“ existiert bereits.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1998)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:421)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2929)



=========================================================================================================================================================================================================================
POSTGRES 9.6 logs
=========================================================================================================================================================================================================================

DriverManager.getConnection("jdbc:postgresql://localhost:10433/app?charSet=UTF-8&user=xxxx&password=xxxx&logLevel=2&loglevel=2")
trying org.postgresql.Driver
13:52:38.914 (1) PostgreSQL 9.4.1211
13:52:38.920 (1) Trying to establish a protocol version 3 connection to localhost:10433
13:52:38.934 (1) Receive Buffer Size is 8192
13:52:38.934 (1) Send Buffer Size is 8192
13:52:38.936 (1)  FE=> StartupPacket(user=xxxx, database=app, client_encoding=UTF8, DateStyle=ISO, TimeZone=Europe/Berlin, extra_float_digits=2)
13:52:38.978 (1)  <=BE AuthenticationReqMD5(salt=1b61dbea)
13:52:38.985 (1)  FE=> Password(md5digest=md557d9e4eaa7fd9cedc1141ad09145b449)
13:52:38.986 (1)  <=BE AuthenticationOk
13:52:39.003 (1)  <=BE ParameterStatus(application_name = )
13:52:39.003 (1)  <=BE ParameterStatus(client_encoding = UTF8)
13:52:39.004 (1)  <=BE ParameterStatus(DateStyle = ISO, DMY)
13:52:39.004 (1)  <=BE ParameterStatus(integer_datetimes = on)
13:52:39.004 (1)  <=BE ParameterStatus(IntervalStyle = postgres)
13:52:39.004 (1)  <=BE ParameterStatus(is_superuser = on)
13:52:39.004 (1)  <=BE ParameterStatus(server_encoding = UTF8)
13:52:39.004 (1)  <=BE ParameterStatus(server_version = 9.6.0)
13:52:39.004 (1)  <=BE ParameterStatus(session_authorization = xxxx)
13:52:39.004 (1)  <=BE ParameterStatus(standard_conforming_strings = on)
13:52:39.004 (1)  <=BE ParameterStatus(TimeZone = Europe/Berlin)
13:52:39.004 (1)  <=BE BackendKeyData(pid=9324,ckey=2044033931)
13:52:39.004 (1)  <=BE ReadyForQuery(I)
13:52:39.006 (1) simple execute, handler=org.postgresql.core.SetupQueryRunner$SimpleResultHandler@4aa8f0b4, maxRows=0, fetchSize=0, flags=1047
13:52:39.007 (1)  FE=> Parse(stmt=null,query="SET extra_float_digits = 3",oids={})
13:52:39.007 (1)  FE=> Bind(stmt=null,portal=null)
13:52:39.007 (1)  FE=> Execute(portal=null,limit=1)
13:52:39.007 (1)  FE=> Sync
13:52:39.009 (1)  <=BE ParseComplete [null]
13:52:39.009 (1)  <=BE BindComplete [unnamed]
13:52:39.009 (1)  <=BE CommandStatus(SET)
13:52:39.010 (1)  <=BE ReadyForQuery(I)
13:52:39.010 (1)     compatible = 90400
13:52:39.010 (1)     loglevel = 2
13:52:39.010 (1)     prepare threshold = 5
13:52:39.012 (1)     types using binary send = TIMESTAMPTZ,UUID,INT2_ARRAY,INT4_ARRAY,BYTEA,TEXT_ARRAY,TIMETZ,INT8,INT2,INT4,VARCHAR_ARRAY,INT8_ARRAY,POINT,TIMESTAMP,TIME,BOX,FLOAT4,FLOAT8,FLOAT4_ARRAY,FLOAT8_ARRAY
13:52:39.013 (1)     types using binary receive = TIMESTAMPTZ,UUID,INT2_ARRAY,INT4_ARRAY,BYTEA,TEXT_ARRAY,TIMETZ,INT8,INT2,INT4,VARCHAR_ARRAY,INT8_ARRAY,POINT,DATE,TIMESTAMP,TIME,BOX,FLOAT4,FLOAT8,FLOAT4_ARRAY,FLOAT8_ARRAY
13:52:39.013 (1)     integer date/time = true
getConnection returning org.postgresql.Driver
13:52:39.023 (1) batch execute 10 queries, handler=org.postgresql.jdbc.BatchResultHandler@6d86b085, maxRows=0, fetchSize=0, flags=5
13:52:39.023 (1)  FE=> Parse(stmt=null,query="BEGIN",oids={})
13:52:39.023 (1)  FE=> Bind(stmt=null,portal=null)
13:52:39.024 (1)  FE=> Execute(portal=null,limit=0)
13:52:39.024 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('0')",oids={})
13:52:39.024 (1)  FE=> Bind(stmt=null,portal=null)
13:52:39.024 (1)  FE=> Describe(portal=null)
13:52:39.024 (1)  FE=> Execute(portal=null,limit=1)
13:52:39.024 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('1')",oids={})
13:52:39.025 (1)  FE=> Bind(stmt=null,portal=null)
13:52:39.025 (1)  FE=> Describe(portal=null)
13:52:39.025 (1)  FE=> Execute(portal=null,limit=1)
13:52:39.025 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('2')",oids={})
13:52:39.025 (1)  FE=> Bind(stmt=null,portal=null)
13:52:39.025 (1)  FE=> Describe(portal=null)
13:52:39.025 (1)  FE=> Execute(portal=null,limit=1)
13:52:39.025 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('3')",oids={})
13:52:39.025 (1)  FE=> Bind(stmt=null,portal=null)
13:52:39.025 (1)  FE=> Describe(portal=null)
13:52:39.025 (1)  FE=> Execute(portal=null,limit=1)
13:52:39.025 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('4')",oids={})
13:52:39.025 (1)  FE=> Bind(stmt=null,portal=null)
13:52:39.025 (1)  FE=> Describe(portal=null)
13:52:39.025 (1)  FE=> Execute(portal=null,limit=1)
13:52:39.025 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('5')",oids={})
13:52:39.025 (1)  FE=> Bind(stmt=null,portal=null)
13:52:39.025 (1)  FE=> Describe(portal=null)
13:52:39.025 (1)  FE=> Execute(portal=null,limit=1)
13:52:39.026 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('6')",oids={})
13:52:39.026 (1)  FE=> Bind(stmt=null,portal=null)
13:52:39.026 (1)  FE=> Describe(portal=null)
13:52:39.026 (1)  FE=> Execute(portal=null,limit=1)
13:52:39.026 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('7')",oids={})
13:52:39.026 (1)  FE=> Bind(stmt=null,portal=null)
13:52:39.026 (1)  FE=> Describe(portal=null)
13:52:39.026 (1)  FE=> Execute(portal=null,limit=1)
13:52:39.026 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('8')",oids={})
13:52:39.026 (1)  FE=> Bind(stmt=null,portal=null)
13:52:39.026 (1)  FE=> Describe(portal=null)
13:52:39.026 (1)  FE=> Execute(portal=null,limit=1)
13:52:39.026 (1)  FE=> Parse(stmt=null,query="INSERT INTO TESTTABLE VALUES('9')",oids={})
13:52:39.026 (1)  FE=> Bind(stmt=null,portal=null)
13:52:39.026 (1)  FE=> Describe(portal=null)
13:52:39.026 (1)  FE=> Execute(portal=null,limit=1)
13:52:39.026 (1)  FE=> Sync
13:52:39.030 (1)  <=BE ParseComplete [null]
13:52:39.030 (1)  <=BE BindComplete [unnamed]
13:52:39.030 (1)  <=BE CommandStatus(BEGIN)
13:52:39.030 (1)  <=BE ParseComplete [null]
13:52:39.030 (1)  <=BE BindComplete [unnamed]
13:52:39.030 (1)  <=BE NoData
13:52:39.030 (1)  <=BE CommandStatus(INSERT 0 1)
13:52:39.030 (1)  <=BE ParseComplete [null]
13:52:39.030 (1)  <=BE BindComplete [unnamed]
13:52:39.030 (1)  <=BE NoData
13:52:39.030 (1)  <=BE CommandStatus(INSERT 0 1)
13:52:39.031 (1)  <=BE ParseComplete [null]
13:52:39.031 (1)  <=BE BindComplete [unnamed]
13:52:39.031 (1)  <=BE NoData
13:52:39.031 (1)  <=BE CommandStatus(INSERT 0 1)
13:52:39.031 (1)  <=BE ParseComplete [null]
13:52:39.031 (1)  <=BE BindComplete [unnamed]
13:52:39.031 (1)  <=BE NoData
13:52:39.031 (1)  <=BE CommandStatus(INSERT 0 1)
13:52:39.031 (1)  <=BE ParseComplete [null]
13:52:39.031 (1)  <=BE BindComplete [unnamed]
13:52:39.031 (1)  <=BE NoData
13:52:39.031 (1)  <=BE CommandStatus(INSERT 0 1)
13:52:39.031 (1)  <=BE ParseComplete [null]
13:52:39.031 (1)  <=BE BindComplete [unnamed]
13:52:39.031 (1)  <=BE NoData
13:52:39.034 (1)  <=BE ErrorMessage(FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »testtable_pkey«
Detail: Schlüssel »(id)=(5)« existiert bereits.)
org.postgresql.util.PSQLException: FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »testtable_pkey«
Detail: Schlüssel »(id)=(5)« existiert bereits.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2458)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2158)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:463)
at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:794)
at com.app.generator.TestDataGenerator.generateRecipients(TestDataGenerator.java:31)
at com.app.generator.TestReturnCodes.main(TestReturnCodes.java:66)
SQLException: SQLState(23505)
SQLState(23505) vendor code(0)
java.sql.BatchUpdateException: Batch entry 5 INSERT INTO TESTTABLE VALUES('5') was aborted: FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »testtable_pkey«
Detail: Schlüssel »(id)=(5)« existiert bereits.  Call getNextException to see other errors in the batch.
at org.postgresql.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:151)
at org.postgresql.core.ResultHandlerDelegate.handleError(ResultHandlerDelegate.java:45)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2159)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:463)
at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:794)
at com.inxmail.generator.TestDataGenerator.generateRecipients(TestDataGenerator.java:31)
at com.inxmail.generator.TestReturnCodes.main(TestReturnCodes.java:66)
13:52:39.044 (1)  <=BE ReadyForQuery(E)


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (19+ messages)  latest in thread

Message-ID: <109470434.726210.1476447331901@mail.yahoo.com>
Permalink:  ../109470434.726210.1476447331901@mail.yahoo.com/
Also on:    postgresql.org/message-id/109470434.726210.1476447331901@mail.yahoo.com

 · 

reply

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: tillmann73@yahoo.de
  Subject: Re: Return Codes of BatchUpdateException in PostgreSql 9.6
  In-Reply-To: <109470434.726210.1476447331901@mail.yahoo.com>
  References: <109470434.726210.1476447331901.ref@mail.yahoo.com> <109470434.726210.1476447331901@mail.yahoo.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