Re: patch to add \watch to psql

From: Will Leinweber <will(at)heroku(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Daniel Farina <daniel(at)heroku(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>
Subject: Re: patch to add \watch to psql
Date: 2013-04-04 00:04:44
Message-ID: CAL8LqZS0HFx_vNp+_--xJL_1XLiYYKguhDdtKjt-+kJ5wyB38g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Here is an updated patch that addresses several of the points brought up so
far, such as the sleep, internationalization banner, and zero wait check,
and it removes the premature input check.

Unfortunately rl_clear_screen() is not included at all in libedit, causing
compilation to fail, and I was completely unable to find a way to
distinguish libedit from readline on OS X. It tries extraordinarily hard to
pretend that it's readline. Instead falling back to simple control
characters to clear the screen worked very well on both linux and OS X.

On Tue, Mar 26, 2013 at 2:14 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:

> On 3/24/13 3:10 PM, Tom Lane wrote:
> > I also concur with the complaint here
> >
> http://www.postgresql.org/message-id/CAAZKuFZxyj-RT1aeC6s0g7zM68tDLfbBM1R6HGrbbxnz80KcoA@mail.gmail.com
> > that allowing a minimum sleep of 0 is rather dangerous
>
> The original "watch" command apparently silently corrects a delay of 0
> to 0.1 seconds.
>
> > Another minor question is whether we really need the time-of-day in the
> > banner,
>
> That's also part of the original "watch" and occasionally useful, I think.
>
>

Attachment Content-Type Size
psql-watch-v4.patch application/octet-stream 4.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-04-04 00:18:03 Re: spoonbill vs. -HEAD
Previous Message Gavin Flower 2013-04-03 23:56:41 Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)