Re: change format of logging statements?

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Matthew Hixson <hixson(at)poindextrose(dot)org>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: change format of logging statements?
Date: 2007-04-23 19:41:04
Message-ID: 20070423194104.GE12624@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message judexhuang 2007-04-23 19:53:08 Re: can't start tsearch2 in 8.2.4
Previous Message Matthew Hixson 2007-04-23 19:29:37 change format of logging statements?