Re: Tracing SQL statements that run against my DB - Mailing list pgsql-admin

From Vibhor Kumar
Subject Re: Tracing SQL statements that run against my DB
Date
Msg-id 8A3FD0B8-32D8-4A00-A9C7-DD54F62EA0A4@gmail.com
Whole thread Raw
In response to Tracing SQL statements that run against my DB  (Lucky Shag <luckyshag69@gmail.com>)
List pgsql-admin
On Sep 12, 2010, at 1:16 AM, Lucky Shag wrote:

> I am running Postgres 8.4 on Windows 7.
>
> I would like to view the SQL statements that are run against the database.
>
> What parameter do I need to set where, and where is trace output written?
>


you can use log_statement. Setting this parameter, postgresql will write the SQL in postgresql log files.
For more information, follow the link given below:
http://www.postgresql.org/docs/8.4/static/runtime-config-logging.html#GUC-LOG-STATEMENT

Thanks & Regards,
Vibhor Kumar (PCP & OCP)
ITIL V3 Cerftified.

pgsql-admin by date:

Previous
From: Lucky Shag
Date:
Subject: Tracing SQL statements that run against my DB
Next
From: Anuj Pankaj
Date:
Subject: issue with Postgres uninstallation