postgresql/src/bin/psql
Thomas Munro 7c09d2797e Add PSQL_WATCH_PAGER for psql's \watch command.
Allow a pager to be used by the \watch command.  This works but isn't
very useful with traditional pagers like "less", so use a different
environment variable.  The popular open source tool "pspg" (also by
Pavel) knows how to display the output if you set PSQL_WATCH_PAGER="pspg
--stream".

To make \watch react quickly when the user quits the pager or presses
^C, and also to increase the accuracy of its timing and decrease the
rate of useless context switches, change the main loop of the \watch
command to use sigwait() rather than a sleeping/polling loop, on Unix.

Supported on Unix only for now (like pspg).

Author: Pavel Stehule <pavel.stehule@gmail.com>
Author: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/CAFj8pRBfzUUPz-3gN5oAzto9SDuRSq-TQPfXU_P6h0L7hO%2BEhg%40mail.gmail.com
2021-07-13 11:43:21 +12:00
..
po Translation updates 2021-06-21 12:33:50 +02:00
t Add a copyright notice to perl files lacking one. 2021-05-07 10:56:14 -04:00
.gitignore Add basic TAP tests for psql's tab-completion logic. 2020-01-02 15:02:21 -05:00
command.c Add PSQL_WATCH_PAGER for psql's \watch command. 2021-07-13 11:43:21 +12:00
command.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
common.c Add PSQL_WATCH_PAGER for psql's \watch command. 2021-07-13 11:43:21 +12:00
common.h Add PSQL_WATCH_PAGER for psql's \watch command. 2021-07-13 11:43:21 +12:00
copy.c Remove server and libpq support for old FE/BE protocol version 2. 2021-03-04 10:45:55 +02:00
copy.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
create_help.pl Update copyright for 2021 2021-01-02 13:06:25 -05:00
crosstabview.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
crosstabview.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
describe.c Standardize usages of appendStringInfo and appendPQExpBuffer 2021-06-03 16:38:03 +12:00
describe.h Allow psql's \df and \do commands to specify argument types. 2021-04-07 23:02:21 -04:00
help.c Add PSQL_WATCH_PAGER for psql's \watch command. 2021-07-13 11:43:21 +12:00
help.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
input.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
input.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
large_obj.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
large_obj.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
mainloop.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
mainloop.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
Makefile Update copyright for 2021 2021-01-02 13:06:25 -05:00
nls.mk Translation updates 2021-05-10 14:36:21 +02:00
prompt.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
prompt.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
psqlrc.sample
psqlscanslash.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
psqlscanslash.l Fix incautious handling of possibly-miscoded strings in client code. 2021-06-07 14:15:25 -04:00
settings.h Revert "psql: Show all query results by default" 2021-04-15 19:42:55 +02:00
startup.c Add PSQL_WATCH_PAGER for psql's \watch command. 2021-07-13 11:43:21 +12:00
stringutils.c Fix incautious handling of possibly-miscoded strings in client code. 2021-06-07 14:15:25 -04:00
stringutils.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
tab-complete.c Fixes in ALTER SUBSCRIPTION DROP PUBLICATION code 2021-06-25 09:57:02 +02:00
tab-complete.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
variables.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
variables.h Update copyright for 2021 2021-01-02 13:06:25 -05:00