Stephen Woodbridge <woodbri(at)swoodbridge(dot)com> writes:
> I writing some functions for postgresql extension in C/C++ and I would
> like to be able to check for a pending CancelRequest from the frontend
> so I can take appropriate action to honor this request.
Put "CHECK_FOR_INTERRUPTS();" in some suitably safe place.
regards, tom lane