How to log full substituted queries?
How to log full substituted queries?
От:
andrew fabbro <andrew@fabbro.org>
Дата:
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@fabbro.org] ------------------------------[ quote-o-matic] ----------------------------- "I didn't say that." -- Oliver Wendell Holmes
Re: How to log full substituted queries?
От:
"A. Kretschmer" <andreas.kretschmer@schollglas.com>
Дата:
am 18.01.2006, um 20:47:23 -0800 mailte andrew fabbro folgendes: > 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 > ) Which version? My guess: prior as 8.1. With 8.1 PG logs the resolved variables. HTH, Andreas -- Andreas Kretschmer (Kontakt: siehe Header) Heynitz: 035242/47212, D1: 0160/7141639 GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net === Schollglas Unternehmensgruppe ===