X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 87FD89FA21B; Sat, 5 Aug 2006 12:59:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 35004-01; Sat, 5 Aug 2006 12:59:11 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from fetter.org (start.fetter.org [66.92.188.65]) by postgresql.org (Postfix) with ESMTP id BEAC69FB1E8; Sat, 5 Aug 2006 12:59:11 -0300 (ADT) Received: by fetter.org (Postfix, from userid 500) id B2AF2C62C1; Sat, 5 Aug 2006 08:59:10 -0700 (PDT) Date: Sat, 5 Aug 2006 08:59:10 -0700 From: David Fetter To: Oliver Jowett Cc: Bruce Momjian , Tom Lane , Dave Cramer , Csaba Nagy , Postgres JDBC , PostgreSQL-patches , PostgreSQL JDBC List Subject: Re: [HACKERS] [PATCHES] log_statement output for protocol Message-ID: <20060805155910.GA10235@fetter.org> References: <200608050523.k755Nto22934@momjian.us> <44D44B44.5070106@opencloud.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44D44B44.5070106@opencloud.com> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.074 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200608/42 X-Sequence-Number: 15569 On Sat, Aug 05, 2006 at 07:39:48PM +1200, Oliver Jowett wrote: > Bruce Momjian wrote: > >OK, updated patch, with output of text bind parameters. New output > >is: > > > > LOG: prepare sel1: SELECT $1 + $2; > > LOG: bind sel1: SELECT $1 + $2; > > LOG: bind sel1: parameter 1: "8" > > LOG: bind sel1: parameter 2: "5" > > LOG: execute sel1: SELECT $1 + $2; > > > >I put each bind parameter on a separate line. Is that OK? > > My only comment here is that this is very verbose. The JDBC driver > now always uses the extended query protocol, even when not doing > "server-side prepare", so you're going to get multiple lines of > output all the time when using JDBC apps. Does this mean that the JDBC driver needs work on this? > A 50-parameter query could be .. interesting .. > > I realize that you need this level of output to reflect what is > happening at the protocol level, but seeing all the protocol detail > is not really what you expect when you turn on basic statement > logging, is it? Possibly not basic statement logging, but there are cases where I would have saved a *lot* of time if it had been available. Cheers, D -- David Fetter http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote!