Re: [HACKERS] log_statement output for protocol - Mailing list pgsql-patches

From David Fetter
Subject Re: [HACKERS] log_statement output for protocol
Date
Msg-id 20060805155910.GA10235@fetter.org
Whole thread Raw
In response to Re: [HACKERS] log_statement output for protocol  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-patches
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 <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666
                              Skype: davidfetter

Remember to vote!

pgsql-patches by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Allow commenting of variables in postgresql.conf to -
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] log_statement output for protocol