Hi, I think I am experiencing the "forest through the trees" type of scenario here.
In a nightly cron I have a shell script that executes a couple of things for our data warehouse. I call it like this from the cron: /home/postgres/DB1/sys/createDB1.sh >> /home/postgres/DB1/logs/createDB1.log 2>&1 within the script: The first calls a function which essentially calls a handful of views. psql -d DB1 -c 'select execute_function_foo();' The second just calls a simple sql script. psql -d DB1 -f /path/to/sql/script.sql What I am trying to get is the elapsed time logged for each individual query or view that the function calls, as though I entered "\timing" from within psql. like: db1=# \timing Timing is on. db1=# select count(*) from table_foo; count --------- 5232924 (1 row) Time: 3248.064 ms except I need that to show up in the nightly log for each sql statement. running postgresql 8.2.5 with RHEL 4 Thanking you in advance for any assistance. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general