On Oct 25, 2006, at 10:11 AM, A. Kretschmer wrote:
> Set this in your postgresql.conf:
>
> log_statement = all
>
> Reload the server, and then you can find all your statements in the
> log.
or, preferably, on a per-connection basis, execute this SQL statement:
set log_min_duration_statement = 0
then only those queries for that connection will be logged.
otherwise you get *way* too much stuff to sort out.
Another useful setting which I always enable (in my postgresql.conf
file) is
log_min_error_statement = error
so that any statement that generates an error will be appended to the
error log entry. otherwise you just see the error notice and have no
clue what caused it.