How to log full substituted queries?

From: andrew fabbro <andrew(at)fabbro(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: How to log full substituted queries?
Date: 2006-01-19 04:47:23
Message-ID: Pine.LNX.4.64.0601182037020.15506@hallofjustice.fabbro.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to debug some queries and have

log_statement = 'all'

in my postgresql.conf. When I look in the resultant log file, I see
entries like this:

INSERT INTO servers (
hostname, last_modified, serial,
asset_tag, grid, admin )
VALUES
( $1,CURRENT_DATE,$2,
$3,$4,$5
)

What I'd actually like to see is the fully-parsed version, e.g.

INSERT INTO servers (
hostname, last_modified, serial,
asset_tag, grid, admin )
VALUES
( 'loki', CURRENT_DATE, '10-129CF',
'213457','23G','ut1'
)

...so I can see what the client is actually sending. Is there a
way to do this?

andrew fabbro [andrew(at)fabbro(dot)org]
------------------------------[ quote-o-matic] -----------------------------
"I didn't say that."
-- Oliver Wendell Holmes

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Trent Shipley 2006-01-19 04:49:38 Re: RAID-50
Previous Message Sundaramoorthy, Annapoorani (Cognizant) 2006-01-19 04:39:28 Execution of stored procedures