Re: psql - add SHOW_ALL_RESULTS option
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Michael Paquier <michael@paquier.xyz>
Cc: Julien Rouhaud <rjuju123@gmail.com>,
"shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>,
"pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2021-04-09T18:04:11Z
Lists: pgsql-hackers
>> Yep, it looks much better. I found it strange that the later did a reset but >> was not doing the set. >> >> Attached v2 does as you suggest. > > Close enough. I was thinking about this position of the attached, > which is more consistent with the rest. Given the structural complexity of the function, the end of the file seemed like a good place to have an all-path-guaranteed reset. I find it a little bit strange to have the Set at the upper level and the Reset in many… but not all branches, though. For instance the on_error_rollback_savepoint/svptcmd branch includes a reset long after many other conditional resets, I cannot guess whether the initial set is still active or has been long wiped out and this query is just not cancellable. Also, ISTM that in the worst case a cancellation request is sent to a server which is idle, in which case it will be ignored, so the code should be in no hurry to clean it, at least not at the price of code clarity. Anyway, the place you suggest seems ok. -- 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