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-04T06:37:04Z
Lists: pgsql-hackers
Attachments
- PSQL_WATCH_PAGER-20200304.patch (text/x-patch) patch
Hi Here is a little bit updated patch - detection of end of any child process cannot be used on WIN32. I am not an expert on this platform, but from what I read about it, there is no easy solution. The problem is in _popen function. We lost the handle of the created process, and it is not possible to find it. Writing a new implementation of _popen function looks like a big overkill to me. We can disable this functionality there completely (on win32) or we can accept the waiting time after pager has ended until we detect pipe error. I hope so this is acceptable, in this moment, because a) there are not pspg for windows (and there was only few requests for porting there in last 4 years), b) usage of psql on mswin platform is not too wide, c) in near future, there will be an possibility to use Unix psql on this platform. Regards 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