From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal - psql - use pager for \watch command |
Date: | 2022-03-24 10:21:04 |
Message-ID: | CAFj8pRCmt1cttDwYGFxc9G9wOqicruX3YG4SNa0gYeN3hy-ZFQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
čt 24. 3. 2022 v 11:05 odesílatel Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
napsal:
> On Wed, Jul 14, 2021 at 6:06 AM Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> wrote:
> > út 13. 7. 2021 v 19:50 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:
> >> After playing with this along the way to fixing the sigwait issues,
> >> I have a gripe/suggestion. If I hit control-C while the thing
> >> is waiting between queries, eg
> >>
> >> regression=# select now() \watch
> >> Tue Jul 13 13:44:44 2021 (every 2s)
> >>
> >> now
> >> -------------------------------
> >> 2021-07-13 13:44:44.396565-04
> >> (1 row)
> >>
> >> Tue Jul 13 13:44:46 2021 (every 2s)
> >>
> >> now
> >> -------------------------------
> >> 2021-07-13 13:44:46.396572-04
> >> (1 row)
> >>
> >> ^Cregression=#
> >>
> >> then as you can see I get nothing but the "^C" echo before the next
> >> psql prompt. The problem with this is that now libreadline is
> >> misinformed about the cursor position, messing up any editing I
> >> might try to do on the next line of input. So I think it would
> >> be a good idea to have some explicit final output when the \watch
> >> command terminates, along the line of
> >>
> >> ...
> >> Tue Jul 13 13:44:46 2021 (every 2s)
> >>
> >> now
> >> -------------------------------
> >> 2021-07-13 13:44:46.396572-04
> >> (1 row)
> >>
> >> ^C\watch cancelled
> >> regression=#
> >>
> >> This strikes me as a usability improvement even without the
> >> readline-confusion angle.
> >
> > I'll look at this issue.
>
> Hi Pavel,
>
> Do you have a patch for this?
>
Not yet. I forgot about this issue.
Regards
Pavel
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2022-03-24 10:21:07 | turn fastgetattr and heap_getattr to inline functions |
Previous Message | Thomas Munro | 2022-03-24 10:04:37 | Re: proposal - psql - use pager for \watch command |