Re: Error-safe user functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Error-safe user functions
Date
Msg-id 2791143.1671830567@sss.pgh.pa.us
Whole thread Raw
In response to Re: Error-safe user functions  (Ted Yu <yuzhihong@gmail.com>)
Responses Re: Error-safe user functions  (Ted Yu <yuzhihong@gmail.com>)
Re: Error-safe user functions  (Ted Yu <yuzhihong@gmail.com>)
List pgsql-hackers
Ted Yu <yuzhihong@gmail.com> writes:
> In makeItemLikeRegex :

> +                       /* See regexp.c for explanation */
> +                       CHECK_FOR_INTERRUPTS();
> +                       pg_regerror(re_result, &re_tmp, errMsg,
> sizeof(errMsg));
> +                       ereturn(escontext, false,

> Since an error is returned, I wonder if the `CHECK_FOR_INTERRUPTS` call is
> still necessary.

Yes, it is.  We don't want a query-cancel transformed into a soft error.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Ted Yu
Date:
Subject: Re: Error-safe user functions
Next
From: Ted Yu
Date:
Subject: Re: Error-safe user functions