On Tue, Jul 05, 2022 at 07:37:03PM -0400, Tom Lane wrote: > Nonetheless, it'd be a good idea to use an interruptible sort in > as many places as we can. If we don't mind YA copy of the qsort > code, I'd be inclined to propose inventing qsort_interruptible > which is like qsort_arg but also does CHECK_FOR_INTERRUPTS. > (There seems no reason to support a non-arg version, since you > can just pass NULL.) Or we could redefine qsort_arg as allowing > interrupts, but that might still carry some surprises for existing > code.
Agreed to use a new and different API for this purpose. It seems like a tool where one could write some new code and use an interruptible qsort() thinking that it is fine, still a preperly-documented API has clear benefits. -- Michael
signature.asc
Description: PGP signature