From: | Daniel Farina <daniel(at)heroku(dot)com> |
---|---|
To: | Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com> |
Cc: | Will Leinweber <will(at)heroku(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: patch to add \watch to psql |
Date: | 2012-10-20 19:49:23 |
Message-ID: | CAAZKuFbUNe=tJ7vpDBV4BX8gpo_RoC36aW0uYztV0bTyyOxBzw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Oct 20, 2012 at 12:19 AM, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com> wrote:
> For these reasons, I can imagine using "watch -n2 psql -c …", but not
> \watch in its present form. (Of course, I doubt anyone would be enthused
> about a proposal to link ncurses into psql, but that's another matter.)
A good point.
Part of the patch is that it disables the pager as so things just keep
being appended to the buffer.
However, I wonder if clever utilization of a pager would give you the
effect you mention with much the same code, and while allowing the old
behavior to be retained, as it is also useful. (appending to the
screen, and not overwriting)
An unrelated defect, although the patch tries to carefully clean up
the 'res' result from psqlexec in the error cases, it does forget to
do that, seemingly, in the 'positive' case, while it is looping. I
think it needs another pqclear in there.
--
fdr
From | Date | Subject | |
---|---|---|---|
Next Message | Guillaume Lelarge | 2012-10-20 21:41:15 | Re: Bug in -c CLI option of pg_dump/pg_restore |
Previous Message | Peter Geoghegan | 2012-10-20 19:10:08 | Re: enhanced error fields |