I am currently using \timing on to do some simple performance testing in Postgres. I would like to run many queries and pipe the timing results to a file. However, all of the options I have tried (\o, \l, and their command-line equivalents) pipe only the query results to a file. The Time: 1.234 ms message is not written to the file.
Is there any way I can pipe the timing output caused by \timing on into a file, or will I have to choose some other method for performing my tests?
\o /dev/null(to eliminate results) and\set PROMPT1(to set the prompt to the empty string) in my.psqlrcfile. – apsillers Jul 26 '12 at 02:03psqlsessions, run this in your shell (note the double backslash):echo '\\timing on' >> ~/.psqlrc– Timur Shtatland Apr 25 '23 at 20:07