*** pgsql/src/bin/psql/command.c 2008/05/14 19:10:29 1.189 --- pgsql/src/bin/psql/command.c 2008/06/11 10:48:17 1.190 *************** *** 3,9 **** * * Copyright (c) 2000-2008, PostgreSQL Global Development Group * ! * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.188 2008/05/08 17:04:26 momjian Exp $ */ #include "postgres_fe.h" #include "command.h" --- 3,9 ---- * * Copyright (c) 2000-2008, PostgreSQL Global Development Group * ! * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.189 2008/05/14 19:10:29 tgl Exp $ */ #include "postgres_fe.h" #include "command.h" *************** exec_command(const char *cmd, *** 884,890 **** /* \timing -- toggle timing of queries */ else if (strcmp(cmd, "timing") == 0) { ! pset.timing = !pset.timing; if (!pset.quiet) { if (pset.timing) --- 884,895 ---- /* \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) *************** exec_command(const char *cmd, *** 892,897 **** --- 897,903 ---- else puts(_("Timing is off.")); } + free(opt); } /* \unset */