Index: doc/src/sgml/ref/psql-ref.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v
retrieving revision 1.203
diff -c -c -r1.203 psql-ref.sgml
*** doc/src/sgml/ref/psql-ref.sgml 8 May 2008 17:04:26 -0000 1.203
--- doc/src/sgml/ref/psql-ref.sgml 13 May 2008 14:41:18 -0000
***************
*** 1867,1876 ****
! \timing
! Toggles a display of how long each SQL statement takes, in milliseconds.
--- 1867,1879 ----
! \timing [ON | OFF]
! Without parameter, toggles a display of how long each SQL
! statement takes, in milliseconds. With parameter, sets same.
Index: src/bin/psql/command.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/bin/psql/command.c,v
retrieving revision 1.188
diff -c -c -r1.188 command.c
*** src/bin/psql/command.c 8 May 2008 17:04:26 -0000 1.188
--- src/bin/psql/command.c 13 May 2008 14:41:21 -0000
***************
*** 884,890 ****
/* \timing -- toggle timing of queries */
else if (strcmp(cmd, "timing") == 0)
{
! pset.timing = !pset.timing;
if (!pset.quiet)
{
if (pset.timing)
--- 903,914 ----
/* \timing -- toggle timing of queries */
else if (strcmp(cmd, "timing") == 0)
{
! char *opt = psql_scan_slash_option(scan_state,
! OT_NORMAL, NULL, false);
! if (opt)
! pset.timing = ParseVariableBool(opt);
! else
! pset.timing = !pset.timing;
if (!pset.quiet)
{
if (pset.timing)
***************
*** 892,897 ****
--- 916,922 ----
else
puts(_("Timing is off."));
}
+ free(opt);
}
/* \unset */