On Sat, Oct 20, 2012 at 12:19 AM, Abhijit Menon-Sen <ams@2ndquadrant.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