From: | Stephane Bortzmeyer <bortzmeyer(at)nic(dot)fr> |
---|---|
To: | PostgreSQL General Mailing List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Logging SQL queries? |
Date: | 2002-07-18 10:16:01 |
Message-ID: | 20020718101601.GB30688@nic.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Jul 16, 2002 at 10:40:14PM -0500,
Steve Lane <slane(at)fmpro(dot)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 :-(]
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2002-07-18 12:07:09 | Re: Logging SQL queries? |
Previous Message | Steve Brett | 2002-07-18 09:07:33 | Appropriate values for sort_mem and shared_buffers |