Show psql timing output for failed queries as well as successful ones

This is useful for example when a long-runing statement such as CREATE
INDEX fails after a long time.
This commit is contained in:
Magnus Hagander 2012-01-18 10:32:54 +01:00
parent ae137bcaab
commit 2106c55ac8

View File

@ -942,7 +942,7 @@ SendQuery(const char *query)
PQclear(results); PQclear(results);
/* Possible microtiming output */ /* Possible microtiming output */
if (OK && pset.timing) if (pset.timing)
printf(_("Time: %.3f ms\n"), elapsed_msec); printf(_("Time: %.3f ms\n"), elapsed_msec);
/* check for events that may occur during query execution */ /* check for events that may occur during query execution */