Re: proposal - psql - use pager for \watch command
Pavel Stehule <pavel.stehule@gmail.com>
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2021-03-23T05:30:49Z
Lists: pgsql-hackers
út 23. 3. 2021 v 0:35 odesílatel Thomas Munro <thomas.munro@gmail.com> napsal: > On Sun, Mar 21, 2021 at 11:43 PM Pavel Stehule <pavel.stehule@gmail.com> > wrote: > > so 20. 3. 2021 v 23:45 odesílatel Thomas Munro <thomas.munro@gmail.com> > napsal: > >> Thoughts? I put my changes into a separate patch for clarity, but > >> they need some more tidying up. > > > > yes, your solution is much better. > > Hmm, there was a problem with it though: it blocked ^C while running > the query, which is bad. I fixed that. I did some polishing of the > code and some editing on the documentation and comments. I disabled > the feature completely on Windows, because it seems unlikely that > we'll be able to know if it even works, in this cycle. > > - output = PageOutput(158, pager ? &(pset.popt.topt) : NULL); > + output = PageOutput(160, pager ? &(pset.popt.topt) : NULL); > > What is that change for? > This is correct - this is the number of printed rows - it is used for decisions about using a pager for help. There are two new rows, and the number is correctly +2 Pavel
Commits
-
Fix \watch's interaction with libedit on ^C.
- 7c5953b7b5dc 10.22 landed
- 21ed12b14a32 11.17 landed
- 09224a35cdaa 12.12 landed
- e5b5b4448ce0 13.8 landed
- ab7fef0acfbd 14.5 landed
- 31b485f883a7 15.0 landed
- 21267b647719 16.0 landed
-
Add PSQL_WATCH_PAGER for psql's \watch command.
- 7c09d2797ecd 15.0 landed
-
psql: Show all query results by default
- 3a5130672296 14.0 cited
-
Add a comment warning against use of pg_usleep() for long sleeps.
- 8c1a71d36f5d 9.4.0 cited