pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vibhor Kumar <vibhor.aim@gmail.com>
To: Lucky Shag <luckyshag69@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Tracing SQL statements that run against my DB
Date: Sun, 12 Sep 2010 09:19:03 +0530
Message-ID: <8A3FD0B8-32D8-4A00-A9C7-DD54F62EA0A4@gmail.com> (raw)
In-Reply-To: <AANLkTi=_ryfjp6Hfgd-nnaUAfR8jNzen+b8xbMscQAoM@mail.gmail.com>
References: <AANLkTi=_ryfjp6Hfgd-nnaUAfR8jNzen+b8xbMscQAoM@mail.gmail.com>


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.



view thread (2+ messages)

Message-ID: <8A3FD0B8-32D8-4A00-A9C7-DD54F62EA0A4@gmail.com>
Permalink:  ../8A3FD0B8-32D8-4A00-A9C7-DD54F62EA0A4@gmail.com/
Also on:    postgresql.org/message-id/8A3FD0B8-32D8-4A00-A9C7-DD54F62EA0A4@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: vibhor.aim@gmail.com, luckyshag69@gmail.com
  Subject: Re: Tracing SQL statements that run against my DB
  In-Reply-To: <8A3FD0B8-32D8-4A00-A9C7-DD54F62EA0A4@gmail.com>
  References: <AANLkTi=_ryfjp6Hfgd-nnaUAfR8jNzen+b8xbMscQAoM@mail.gmail.com> <8A3FD0B8-32D8-4A00-A9C7-DD54F62EA0A4@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox