need suggestion

Started by kostika goricaover 13 years ago3 messagesgeneral
Jump to latest
#1kostika gorica
kosti_31@hotmail.com

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.

#2Laurenz Albe
laurenz.albe@cybertec.at
In reply to: kostika gorica (#1)
Re: need suggestion

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

#3kostika gorica
kosti_31@hotmail.com
In reply to: Laurenz Albe (#2)
Re: need suggestion

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.