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

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: 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>
Subject: Re: [HACKERS] [PATCHES] log_statement output for protocol
Date: 2006-08-05 07:39:48
Message-ID: 44D44B44.5070106@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc pgsql-patches

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.

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?

-O

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2006-08-05 07:43:01 Re: 8.2 features status
Previous Message Rick Gigger 2006-08-05 07:15:09 Re: 8.2 features status

Browse pgsql-jdbc by date

  From Date Subject
Next Message David Fetter 2006-08-05 15:59:10 Re: [HACKERS] [PATCHES] log_statement output for protocol
Previous Message Bruce Momjian 2006-08-05 05:23:55 Re: [HACKERS] [PATCHES] log_statement output for protocol

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2006-08-05 14:26:50 Re: Allow commenting of variables in postgresql.conf to -
Previous Message Bruce Momjian 2006-08-05 05:23:55 Re: [HACKERS] [PATCHES] log_statement output for protocol