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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: [GENERAL] Request - repeat value of \pset title during \watch interations
Date: 2016-03-21 15:17:33
Message-ID: CAKFQuwag3CNfvJzsGr4RASuC-ismQ+9rt--dy4g8D_Fs9hoC5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Mon, Mar 21, 2016 at 8:03 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Sun, Mar 20, 2016 at 9:31 AM, Michael Paquier
> <michael(dot)paquier(at)gmail(dot)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.​

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-03-21 15:19:25 Re: grant select on pg_stat_activity
Previous Message Scott Marlowe 2016-03-21 15:08:15 Re: PostgreSQL advocacy

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2016-03-21 15:24:32 Re: dealing with extension dependencies that aren't quite 'e'
Previous Message Aleksander Alekseev 2016-03-21 15:13:58 Re: Re: PROPOSAL: make PostgreSQL sanitizers-friendly (and prevent information disclosure)