Re: [GENERAL] Request - repeat value of \pset title during \watch interations - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: [GENERAL] Request - repeat value of \pset title during \watch interations
Date
Msg-id CAKFQuwag3CNfvJzsGr4RASuC-ismQ+9rt--dy4g8D_Fs9hoC5w@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] Request - repeat value of \pset title during \watch interations  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [GENERAL] Request - repeat value of \pset title during \watch interations  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Mon, Mar 21, 2016 at 8:03 AM, Robert Haas <robertmhaas@gmail.com> wrote:
On Sun, Mar 20, 2016 at 9:31 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> And the patch attached gives the following output:
> With title:
> =# \watch 1
> Watch every 1s    Sun Mar 20 22:28:38 2016
> popo
>  a
> ---
>  1
> (1 row)

​This doesn't show the blank line above "popo" that the prior example had...​

>
> And without title:
> Watch every 1s    Sun Mar 20 22:29:31 2016
>
>  a
> ---
>  1
> (1 row)


​Unchanged from present behavior - but its not obvious that the watch line is center-aligned​

And does everybody agree that this is a desirable change?

​Adding the title is desirable.  While I'm inclined to bike-shed this anything that gets it in I can live with and so I'm content letting the author/committer decide where exactly things (including whitespace) appear.

​It is a bit odd that the "Watch every %s...." gets centered if the result is wide but that the title remains left-aligned.

The minimally invasive change would be the following:

>optional title<
>watch<
>(blank line)
>headers
>head-body divider
>body
>optional footer

Though I like the idea of:

>optional title
>(blank line - if Title present)
>headers
>head-body divider
>body
>optional footer
>watch

​David J.​

pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: Re: PROPOSAL: make PostgreSQL sanitizers-friendly (and prevent information disclosure)
Next
From: Robert Haas
Date:
Subject: Re: [GENERAL] Request - repeat value of \pset title during \watch interations