Re: Logging SQL queries?
От | Stephane Bortzmeyer |
---|---|
Тема | Re: Logging SQL queries? |
Дата | |
Msg-id | 20020718101601.GB30688@nic.fr обсуждение исходный текст |
Ответ на | Logging SQL queries? (Steve Lane <slane@fmpro.com>) |
Ответы |
Re: Logging SQL queries?
|
Список | pgsql-general |
On Tue, Jul 16, 2002 at 10:40:14PM -0500, Steve Lane <slane@fmpro.com> wrote a message of 17 lines which said: > Ideally I'd like to capture just the queries that are submitted to the > database. It would be rather annoying to have to log them from the > application layer, so I'm hoping there's some suitable log-level setting on > the back end that can do this. A related question: does anyone has a function to call syslog()? I would like to set up triggers which logs with the syslog system, but only some events (so debug_print_query is not for me). I cannot write this function in Python (because it exists only as a safe language), I can do it in Perl but Perl in PostgreSQL does not have global variables so I have to openlog() each time (I'm afraid, although I didn't benchmark, that it may slow down the system.). Before I study C or Tcl, does anyone has a working solution? [I noticed contrib/pg_logger but it lacks documentation :-(]
В списке pgsql-general по дате отправления: