From 12f8696d128078bed5b583bb70a6a3b96ba4b927 Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Mon, 11 Jan 2010 17:57:36 +0100 Subject: [PATCH] Do not allow to catch HS errors in plpgsql. --- src/pl/plpgsql/src/pl_exec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index b9ca54f447..810ef8c444 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -897,7 +897,9 @@ exception_matches_conditions(ErrorData *edata, PLpgSQL_condition *cond) * OTHERS matches everything *except* query-canceled; if you're * foolish enough, you can match that explicitly. */ - if (sqlerrstate == 0) + if (edata->sqlerrcode == ERRCODE_QUERY_CANCELED_HS) + ; + else if (sqlerrstate == 0) { if (edata->sqlerrcode != ERRCODE_QUERY_CANCELED) return true; -- 2.39.5