pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <ringerc@ringerc.id.au>
To: Brett Walker <brett.walker@geometryit.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: Curious behaviour with Execute Batch and Prepared Statements
Date: Mon, 25 Jun 2012 12:34:25 +0800
Message-ID: <4FE7EA51.60308@ringerc.id.au> (raw)
In-Reply-To: <4B95BC7335A13A42AD0D23462F91AE6F6163F1445A@echo.geometryit.com>
References: <4B95BC7335A13A42AD0D23462F91AE6F6163F1445A@echo.geometryit.com>

On 06/24/2012 01:58 PM, Brett Walker wrote:
>
> I have a problem that I have described on stackoverflow. It is here: 
> http://stackoverflow.com/questions/11167471/curious-behaviour-with-executebatch-and-prepared-stateme...
>

OK, so you've set log_statement = 'all' and restarted or reloaded Pg, 
re-run your test, and you still don't see the statement hitting the DB? 
You've possibly found a bug. Now you need to narrow it down.

Does this fail if you run the same statement against 9.1? ie is it 
specifically a PgJDBC 9.1 vs PostgreSQL 8.3 issue? Or does it happen 
irrespective of the version of PostgreSQL being targeted?  Does the 
issue exist in older versions of PgJDBC too?

Try enabling detailed logging in PgJDBC and see if you can make out 
what's going wrong. See: 
http://jdbc.postgresql.org/documentation/91/connect.html#connection-parameters 
and 'loglevel' .Set loglevel = 2 in the JDBC driver and re-run your tests.

If that doesn't help: Grab the PgJDBC sources. Attach a debugger to the 
test and step through the problem statement execution. Watch what PgJDBC 
is doing, see where it goes wrong.

If you don't want to do all that: Create a self-contained test case as a 
standalone Java program (source, ant or maven build, all dependencies, 
etc) that can simply be downloaded and run against a clean PostgreSQL 
database to demonstrate your problem. You'll want to provide a .sql 
script to set up the test environment by populating the database too.

--
Craig Ringer

view thread (7+ messages)  latest in thread

Message-ID: <4FE7EA51.60308@ringerc.id.au>
Permalink:  ../4FE7EA51.60308@ringerc.id.au/
Also on:    postgresql.org/message-id/4FE7EA51.60308@ringerc.id.au

 · 

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: ringerc@ringerc.id.au, brett.walker@geometryit.com
  Subject: Re: Curious behaviour with Execute Batch and Prepared Statements
  In-Reply-To: <4FE7EA51.60308@ringerc.id.au>
  References: <4B95BC7335A13A42AD0D23462F91AE6F6163F1445A@echo.geometryit.com> <4FE7EA51.60308@ringerc.id.au>

* 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