Re: [PATCH] proposal for regexp_count, regexp_instr, regexp_substr and regexp_replace

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] proposal for regexp_count, regexp_instr, regexp_substr and regexp_replace
Дата
Msg-id 1572284.1627866140@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH] proposal for regexp_count, regexp_instr, regexp_substr and regexp_replace  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I wrote:
> ... aside from the question of whether
> a too-large subexpression number should be an error or not.

Oh ... poking around some more, I noticed a very nearby precedent.
regexp_replace's replacement string can include \1 to \9 to insert
the substring matching the N'th parenthesized subexpression.  But
if there is no such subexpression, you don't get an error, just
an empty insertion.  So that seems like an argument for not
throwing an error for an out-of-range subexpr parameter.

            regards, tom lane



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