Re: psql - add SHOW_ALL_RESULTS option
Pavel Stehule <pavel.stehule@gmail.com>
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2021-07-22T15:13:45Z
Lists: pgsql-hackers
čt 22. 7. 2021 v 16:49 odesílatel Fabien COELHO <coelho@cri.ensmp.fr> napsal: > > Hello, > > > Minimally for PSQL_WATCH_PAGER, the pager should exit after some time, > but > > before it has to repeat data reading. Elsewhere the psql will hang. > > Sure. The "pager.pl" script I sent exits after reading a few lines. > > > can be solution to use special mode for psql, when psql will do write to > > logfile and redirect to file instead using any (simplified) pager? > > I do not want a special psql mode, I just would like "make check" to tell > me if I broke the PSQL_WATCH_PAGER feature after reworking the > multi-results patch. > > > Theoretically, there is nothing special on usage of pager, and just you > can > > test redirecting to file. > > I do not follow. For what I seen the watch pager feature is somehow a > little different, and I'd like to be sure I'm not breaking anything. > > For your information, pspg does not seem to like being fed two results > > sh> PSQL_WATCH_PAGER="pspg --stream" > psql> SELECT NOW() \; SELECT RANDOM() \watch 1 > > The first table is shown, the second seems ignored. > pspg cannot show multitable results, so it is not surprising. And I don't think about supporting this. Unfortunately I am not able to detect this situation and show some warnings, just because psql doesn't send enough data for it. Can be nice if psql sends some invisible characters, that allows synchronization. But there is nothing. I just detect the timestamp line and empty lines. > -- > Fabien. >
Commits
-
psql: Show all query results by default
- 7844c9918a43 15.0 landed
- 3a5130672296 14.0 landed
-
psql: Refactor ProcessResult()
- 5519d5affdfa 15.0 landed
-
psql: Refactor SendQuery()
- 8910a25fef3d 15.0 landed
-
psql: Add test for psql behavior on server crash
- 8cd7627c7b19 15.0 landed
-
psql: Additional tests
- 9028cce426ba 15.0 landed
-
Improve some psql test code
- fbee60f6a4ff 15.0 landed
-
psql: Fix some scan-build warnings
- 390edeeb570c 15.0 landed
-
psql: Add test for handling of replication commands
- 67c069848a99 15.0 landed
-
psql: More tests
- c0280bc3edeb 15.0 landed
-
psql: Add various tests
- 14d755b00037 15.0 landed
-
psql: Add test for query canceling
- 5b3f471ff23a 15.0 landed
-
Revert "psql: Show all query results by default"
- fae65629cec8 14.0 landed
-
Extend a test case a little
- b3a9e9897ec7 14.0 landed