need suggestion

Lists: pgsql-general
From: kostika gorica <kosti_31(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: need suggestion
Date: 2012-10-15 09:31:56
Message-ID: 1350293516332-5728154.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hello,
I have an application already running, accessing the database (postgresql
8.1). I need a solution, that prints (on a file, or somehow) the queries
being executed every time the app accesses the database.
Is there any ON DATABASE ACCESS trigger ?!
Any idea how that can be done?

Thanks in advance.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/need-suggestion-tp5728154.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "kostika gorica *EXTERN*" <kosti_31(at)hotmail(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: need suggestion
Date: 2012-10-15 10:03:00
Message-ID: D960CB61B694CF459DCFB4B0128514C208902024@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

kostika gorica wrote:
> I have an application already running, accessing the database
(postgresql
> 8.1). I need a solution, that prints (on a file, or somehow) the
queries
> being executed every time the app accesses the database.
> Is there any ON DATABASE ACCESS trigger ?!
> Any idea how that can be done?

If you set log_statement='all', all statements will be logged.
You could use the log file.

Yours,
Laurenz Albe


From: kostika gorica <kosti_31(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: need suggestion
Date: 2012-10-15 10:41:25
Message-ID: 1350297685955-5728169.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Thanks a lot. I didn't know that type of log existed :)

--
View this message in context: http://postgresql.1045698.n5.nabble.com/need-suggestion-tp5728154p5728169.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.