Re: Making sure \timing is on

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David Fetter <david(at)fetter(dot)org>, Bruce Momjian <bruce(at)momjian(dot)us>, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, Francisco Reyes <lists(at)stringsutils(dot)com>, PostgreSQL general <pgsql-general(at)postgresql(dot)org>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Making sure \timing is on
Date: 2008-05-14 00:43:28
Message-ID: 20080514004328.GP6966@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-patches

Tom Lane escribió:

> Actually, \a and \H are fairly bogus anyway, because they are "toggling"
> a setting that has more than two values. I wonder whether defining the
> argument as a boolean is really very sane. Perhaps it would be better to
> take the argument if given as just a regular format setting --- ie,
> with an argument, either of these would just be a shorthand for
> \pset format.

Agreed -- they are bogus. However, making "\H aligned" be an alias for
"\pset format aligned" does not look very sane either (is that "html
aligned" or what?)

Seeing how these have been deprecated for a very long while, perhaps the
thing to do is leave their behavior alone and throw a warning when they
are used; in a couple more releases, remove them. However this isn't
very sane either, because we'd break scripts that are using \H for no
good reason.

Another thing we could do is keep them as "toggles", but instead of
aligned/HTML and aligned/unaligned, make them remember the state that
was set at the time they were called, and toggle between HTML (or
aligned) and the last state.

... except that since aligned is the default mode, \a should not toggle
between last state and aligned, but rather between last state and
unaligned. Which makes it a misnomer.

Or maybe the thing to do is leave them damn well alone and just fix
\timing.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-05-14 02:51:00 Re: Couple of question on functions
Previous Message Vyacheslav Kalinin 2008-05-14 00:39:44 Couple of question on functions

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-05-14 02:02:57 Re: stored procedure stats in collector
Previous Message Tom Lane 2008-05-14 00:43:19 Re: stored procedure stats in collector