From: Guillaume Smet <guillaume.smet@gmail.com>
To: mario.splivalo@mobart.hr
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Logging failed sql commands trough jdbc?
Date: Mon, 19 Feb 2007 16:30:21 +0100
Message-ID: <1d4e0c10702190730p718eb535ic9cc6ee7c8115989@mail.gmail.com> (raw)
In-Reply-To: <1171895743.5197.24.camel@localhost.localdomain>
References: <1171895743.5197.24.camel@localhost.localdomain>
Hi Mario,
On 2/19/07, Mario Splivalo <mario.splivalo@mobart.hr> wrote:
> I'm using pg74.215.jdbc3.jar with PostgreSQL 8.1.2. I'm not using jdbc
> driver for postgres 8 because of prepared transactions wich makes my
> postgres log file look like this:
> 2007-02-19 15:02:51.299 CET [32228] <testDb> SELECTLOG: duration:
> 2481.387 ms statement: EXECUTE <unnamed> [PREPARE: select * from
> update_message_status($1, $2, $3, $4, $5, $6, $7) as result]
In fact, you can use 8.1 driver with ?protocolVersion=2.
> Is there a way to force postgres to display those parameters, or to
> force JDBC to log all the queries sent to postgres? Even better, can
> postgres show the parametars in the 'SELECTCONTEXT' line above (instead
> of $1, $2, $3?) I don't need prepared transactions for production
> (although I'm not sure about the speed improvement - not that my test
> were accurate).
If you can plan a migration to PostgreSQL 8.2, values of the
parameters are now logged so it should solve your problem.
--
Guillaume
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: guillaume.smet@gmail.com, mario.splivalo@mobart.hr
Subject: Re: Logging failed sql commands trough jdbc?
In-Reply-To: <1d4e0c10702190730p718eb535ic9cc6ee7c8115989@mail.gmail.com>
References: <1171895743.5197.24.camel@localhost.localdomain> <1d4e0c10702190730p718eb535ic9cc6ee7c8115989@mail.gmail.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