On Mon, Dec 16, 2019 at 11:40:07AM +0900, Michael Paquier wrote: > As the concepts behind cancel_pressed and CancelRequested are > different, we need to keep cancel_pressed and make psql use it. And > the callback used for WIN32 also needs to set the flag. I also think > that we should do a better effort in documenting CancelRequested > properly in cancel.c. All that should be fixed as of the attached, > tested on Linux and from a Windows console. From a point of view of > consistency, this actually brings back the code of psql to the same > state as it was before a4fd3aa, except that we still have the > refactored pieces.
Merging both flags can actually prove to be tricky, as we have some code paths involving --single-step where psql visibly assumes that a cancellation pressed does not necessarily imply one that succeeds is there is a cancellation object around (ExecQueryTuples, tuple printing and \copy). So I have fixed the issue by making the code of psql consistent with what we had before a4fd3aa. I think that it should be actually possible to merge CancelRequested and cancel_pressed while keeping the user-visible changes acceptable, and this requires a very careful lookup. -- Michael
signature.asc
Description: PGP signature