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

From Tom Lane
Subject Re: patch to add \watch to psql
Date
Msg-id 16791.1365120248@sss.pgh.pa.us
Whole thread Raw
In response to Re: patch to add \watch to psql  (Will Leinweber <will@heroku.com>)
Responses Re: patch to add \watch to psql
List pgsql-hackers
Will Leinweber <will@heroku.com> writes:
> 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.

I whacked this around some more, added basic docs, and committed it.

> 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.

I took that out; "works on the two cases I tried" does not mean "portable".

It's possible we could do something involving having configure check for
rl_clear_screen() etc, but that seems like more work than is justified,
not to mention that the results would then be platform-dependent
*by design*.  Frankly I kinda prefer the behavior without a screen clear
anyway; though this may just prove that I'm not accustomed to using the
original "watch".  Anyway, that's open to a followup patch if anybody is
sufficiently set on doing it differently.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: matview scannability rehash (was Re: Drastic performance loss in assert-enabled build in HEAD)
Next
From: Will Leinweber
Date:
Subject: Re: patch to add \watch to psql