Alfred Perlstein <bright@wintelcom.net> writes:
>> Ensure that 'errno' is saved and restored by all signal handlers that
>> might change it.
> I'm not sure why you're doing this, if someone calls PQrequestCancel,
> they shouldn't expect it to preserve errno.
PQrequestCancel is designed and documented to be callable from user
signal handlers, so it seems like good defensive programming to make
it save/restore errno.
regards, tom lane