From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal - psql - use pager for \watch command |
Date: | 2020-07-01 21:03:30 |
Message-ID: | CAFj8pRAx_qCj=gdUW=VYu_r8Cb_w4t-RnCChdSjtH5+m2OhvGQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
st 1. 7. 2020 v 22:41 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:
> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> > I propose new psql environment variable PSQL_WATCH_PAGER. When this
> > variable is not empty, then \watch command starts specified pager, and
> > redirect output to related pipe. When pipe is closed - by pager, then
> > \watch cycle is leaved.
>
> I dunno, this just seems really strange. With any normal pager,
> you'd get completely unusable behavior (per the comments that you
> didn't bother to change). Also, how would the pager know where
> the boundaries between successive query outputs are? If it does
> not know, seems like that's another decrement in usability.
>
This feature is designed for specialized pagers - now only pspg can work in
this mode. But pspg is part of RH, Fedora, Debian, and it is available on
almost Unix platforms.
the pspg knows the psql output format of \watch statement.
The usability of this combination - psql \watch and pspg is really good.
Regards
Pavel
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2020-07-01 21:04:08 | Re: SQL-standard function body |
Previous Message | Stephen Frost | 2020-07-01 20:57:28 | Re: v12 and TimeLine switches and backups/restores |