Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 8EAB89FB81C for ; Mon, 19 Feb 2007 11:30:32 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 50691-06 for ; Mon, 19 Feb 2007 11:30:22 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.235]) by postgresql.org (Postfix) with ESMTP id 4E6079FB618 for ; Mon, 19 Feb 2007 11:30:22 -0400 (AST) Received: by wx-out-0506.google.com with SMTP id i28so2083508wxd for ; Mon, 19 Feb 2007 07:30:21 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=cjB1SazCeDNQDRCSzba0eZlFascc61vP0DFUH4Z6NvSTI1bFGzYWJTLWuYR/LhHPiRwlxPGR6emV/HHW42d4UiSG//Y6s2Sb5wydFJmNUz0KZEqxTek7Wk8cY9qiETrwdRX/JN8TK+Vrwch3944kOPxxXY7/didlmjWrT5XO8UY= Received: by 10.90.104.14 with SMTP id b14mr7185166agc.1171899021056; Mon, 19 Feb 2007 07:30:21 -0800 (PST) Received: by 10.90.113.7 with HTTP; Mon, 19 Feb 2007 07:30:21 -0800 (PST) Message-ID: <1d4e0c10702190730p718eb535ic9cc6ee7c8115989@mail.gmail.com> Date: Mon, 19 Feb 2007 16:30:21 +0100 From: "Guillaume Smet" To: mario.splivalo@mobart.hr Subject: Re: Logging failed sql commands trough jdbc? Cc: pgsql-jdbc@postgresql.org In-Reply-To: <1171895743.5197.24.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1171895743.5197.24.camel@localhost.localdomain> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/99 X-Sequence-Number: 16655 Hi Mario, On 2/19/07, Mario Splivalo 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] SELECTLOG: duration: > 2481.387 ms statement: EXECUTE [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