Re: Error-safe user functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Error-safe user functions
Дата
Msg-id 1964968.1671727440@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:
> Yeah, I started there, but it's substantially more complex - unlike cube
> the jsonpath scanner calls the error routines as well as the parser.
> Anyway, here's a patch.

I looked through this and it seems generally OK.  A minor nitpick is
that we usually write "(Datum) 0" not "(Datum) NULL" for dont-care Datum
values.  A slightly bigger issue is that makeItemLikeRegex still allows
an error to be thrown from RE_compile_and_cache if a bogus regex is
presented.  But that could be dealt with later.

(I wonder why this is using RE_compile_and_cache at all, really,
rather than some other API.  There doesn't seem to be value in
forcing the regex into the cache at this point.)

            regards, tom lane



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

Предыдущее
От: Dmitry Dolgov
Дата:
Сообщение: Re: Schema variables - new implementation for Postgres 15 (typo)
Следующее
От: Justin Pryzby
Дата:
Сообщение: Re: Add LZ4 compression in pg_dump