> > > No, because you can't overload based purely on return type. I
> > > suppose they could write it to take an int8 pid or
> something, but that's a hack.
> >
> > Well, how many people want to vote for Andreas' suggestion
> of having
> > both
> >
> > int pg_cancel_backend(int)
> > bool pg_backend_cancel(int)
> >
> > with the former deprecated but still there for backward
> compatibility?
>
> I could vote for:
>
> bool pg_query_cancel(int)
>
> backend_cancel or cancel_backend sounds like it should
> terminate the entire backend like kill -TERM would do.
IIRC, the original discussion had a possible pg_query_cancel(int)
functoin that would cancel a query based on XID or something like that,
and we wanted to differentiate from that. (No such function was ever
created, but it was the reason, IIRC)
Note that at this time there was also a pg_backend_terminate(int) that
would terminate the backend (in fact, IIRC it's still in the code, but
commented out). When both exist, the difference is clear...
//Magnus