Re: Error-safe user functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Error-safe user functions
Дата
Msg-id 1815581.1671689454@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Error-safe user functions  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Error-safe user functions  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> And here's another for contrib/seg
> I'm planning to commit these two in the next day or so.

I didn't look at the jsonpath one yet.  The seg patch passes
an eyeball check, with one minor nit: in seg_atof,

+    *result = float4in_internal(value, NULL, "real", value, escontext);

don't we want to use "seg" as the type_name?

Even more nitpicky, in

+seg_yyerror(SEG *result, struct Node *escontext, const char *message)
 {
+    if (SOFT_ERROR_OCCURRED(escontext))
+        return;

I'd be inclined to add some explanation, say

+seg_yyerror(SEG *result, struct Node *escontext, const char *message)
 {
+    /* if we already reported an error, don't overwrite it */
+    if (SOFT_ERROR_OCCURRED(escontext))
+        return;

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: Perform streaming logical transactions by background workers and parallel apply
Следующее
От: "Anton A. Melnikov"
Дата:
Сообщение: Re: [BUG] pg_upgrade test fails from older versions.