Re: [HACKERS] [PATCHES] log_statement output for protocol

From: David Fetter <david(at)fetter(dot)org>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dave Cramer <pg(at)fastcrypt(dot)com>, Csaba Nagy <nagy(at)ecircle-ag(dot)com>, Postgres JDBC <pgsql-jdbc(at)postgresql(dot)org>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>, PostgreSQL JDBC List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: [HACKERS] [PATCHES] log_statement output for protocol
Date: 2006-08-05 15:59:10
Message-ID: 20060805155910.GA10235@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc 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(at)fetter(dot)org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter

Remember to vote!

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-08-05 16:22:02 Re: 8.2 features status
Previous Message Joshua D. Drake 2006-08-05 15:32:20 Re: 8.2 features status

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2006-08-05 16:27:25 Re: [HACKERS] [PATCHES] log_statement output for protocol
Previous Message Oliver Jowett 2006-08-05 07:39:48 Re: [HACKERS] [PATCHES] log_statement output for protocol

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-08-05 16:27:25 Re: [HACKERS] [PATCHES] log_statement output for protocol
Previous Message Jonah H. Harris 2006-08-05 15:12:09 Hierarchical Queries--Status