Re: change format of logging statements? - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: change format of logging statements?
Date
Msg-id 20070423194104.GE12624@alvh.no-ip.org
Whole thread Raw
In response to change format of logging statements?  (Matthew Hixson <hixson@poindextrose.org>)
Responses Re: change format of logging statements?  (Matthew Hixson <hixson@poindextrose.org>)
List pgsql-general
Matthew Hixson wrote:
> Postgres 8.2.0 is logging statements with variables like $1, $2, etc.
> and then on the next line saying:
>
> DETAIL:  parameters: $1 = '100', $2 = '100', $3 = '1003'
>
> Is it possible to get statements logged with the parameters placed
> into the actual query statement so that its more convenient to copy
> and paste them into psql while debugging?  The reason for this is
> that Hibernate is creating the queries and I'd like to see exactly
> what those queries are returning.

Not really.  You could probably use PREPARE <the query as first logged>
and EXECUTE with the given paramters instead of interpolating the
parameters in the query itself.  It might be easier.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-general by date:

Previous
From: Matthew Hixson
Date:
Subject: change format of logging statements?
Next
From: "Brad Buran"
Date:
Subject: Re: Missing magic block