Re: patch to add \watch to psql - Mailing list pgsql-hackers

From Will Leinweber
Subject Re: patch to add \watch to psql
Date
Msg-id CAL8LqZS0HFx_vNp+_--xJL_1XLiYYKguhDdtKjt-+kJ5wyB38g@mail.gmail.com
Whole thread Raw
In response to Re: patch to add \watch to psql  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: patch to add \watch to psql
Re: patch to add \watch to psql
List 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@gmx.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

pgsql-hackers by date:

Previous
From: Gavin Flower
Date:
Subject: Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Next
From: Tom Lane
Date:
Subject: Re: spoonbill vs. -HEAD