Re: patch to add \watch to psql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Will Leinweber <will(at)heroku(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, 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-05 00:04:08
Message-ID: 16791.1365120248@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Will Leinweber <will(at)heroku(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Will Leinweber 2013-04-05 00:27:05 Re: patch to add \watch to psql
Previous Message Alvaro Herrera 2013-04-04 23:11:07 Re: matview scannability rehash (was Re: Drastic performance loss in assert-enabled build in HEAD)