Check out the "log_statement" option in the postgresql.conf file (there's an entire section (18.7) in the docs about logging).
-- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general