If I invoke postgres with -d5 every interaction gets dumped to the screen.
example:
postgres@database:~$ psql template1
Welcome to psql
7.4.7, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
template1=#
gets me this output:
2008-09-05 01:34:44 [4421] DEBUG: ProcessQuery
2008-09-05 01:34:44 [4421] DEBUG: CommitTransactionCommand
2008-09-05 01:34:44 [4421] DEBUG: proc_exit(0)
2008-09-05 01:34:44 [4421] DEBUG: shmem_exit...