Re: [GENERAL] Making sure \timing is on

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [GENERAL] Making sure \timing is on
Дата
Msg-id 20080514004328.GP6966@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: [GENERAL] Making sure \timing is on  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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.

В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: stored procedure stats in collector
Следующее
От: Tom Lane
Дата:
Сообщение: Re: stored procedure stats in collector