March 21st, 2012, 03:27 PM
Join Date: Mar 2012
Time spent in forums: 32 m 3 sec
Reputation Power: 0
\timing in PL/pgSQL language in SQL file
Hi, I know how timing work in postgresql prompt, how I do is to type \timing.
However, I have created a sql file that is based on PL/pgSQL language, for example, the sql file looks like the following,
CREATE OR REPLACE FUNCTION make_plpgsql()
CREATE LANGUAGE plpgsql;
for loop on some tables
\timing <----------------------- gives me error
for loop on some tables...
The error is like the following,
psql:test.sql:78: ERROR: syntax error at or near "\"
LINE 39: \timing
How do I make timing work in PL/pgSQL language in SQL file? Thank you.