Thread: Getting postgres to echo queries.

Getting postgres to echo queries.

From
Ben Warren
Date:
Hi,

I'm trying to log all SQL queries sent to postgres v6.5.

I have set PGECHO=yes in the postmaster.init file but nothing about the
SQL queries
appears in the log. I know that the config file is being read and that I
am looking
at the right log file because changes to the init file PGDEBUG level do
cause
different log output.

An echo of the startup call revealed the following:
su postgres -c /usr/lib/postgresql/bin/postmaster -b
/usr/lib/postgresql/bin/postgres -B 128 -D /var/lib/postgres/data -d 2
-i  -o '-E'  > /var/log/postgres.log 2>&1

The -E option for echo queries seems to be passed through correctly.


Any help with this matter will be very much appreciated.


Regards,

Ben

--
================================================================
| Ben Warren                      |        Plugged In Software |
================================================================
http://www.pisoftware.com         |       Ph: +61 (07) 3876 2188
mailto:ben.warren@pisoftware.com  |      Fax: +61 (07) 3876 4899