Re: add function argument names to regex* functions.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: add function argument names to regex* functions.
Дата
Msg-id 3999490.1721339304@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: add function argument names to regex* functions.  (jian he <jian.universality@gmail.com>)
Ответы Re: add function argument names to regex* functions.
Re: add function argument names to regex* functions.
Список pgsql-hackers
jian he <jian.universality@gmail.com> writes:
> [ v5-0001-add-regex-functions-argument-names-to-pg_proc.patch ]

I'm not sure whether we've bikeshedded this to death yet, but
personally I'm content with the naming choices here (which basically
are those already shown in table 9.10).  However, while looking
at the patch I noticed a couple of issues, one small, the other
a bit bigger.

The small issue is that table 9.10 offers this syntax diagram
for regexp_replace:

regexp_replace ( string text, pattern text, replacement text [, start integer ] [, flags text ] ) → text

This implies that it's valid to write

    regexp_replace (string, pattern, replacement, start, flags)

but it is not: we have no function matching that signature.  I'm not
in a hurry to add one, either, for fear of ambiguity against the other
regexp_replace signature.  I think this needs to be broken into two
syntax diagrams:

regexp_replace ( string text, pattern text, replacement text [, start integer ] ) → text
regexp_replace ( string text, pattern text, replacement text [, flags text ] ) → text

The larger issue is that contrib/citext offers versions of some of
these functions that are meant to be drop-in replacements using
citext input.  Hence, we need to add the same parameter names to
those functions, or they'll fail to replace some calls.

            regards, tom lane



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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Showing applied extended statistics in explain Part 2
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: change regexp_substr first argument make tests more easier to understand.