Re: add function argument names to regex* functions.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: add function argument names to regex* functions.
Дата
Msg-id 1674439.1722003451@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.
Список pgsql-hackers
jian he <jian.universality@gmail.com> writes:
> On Fri, Jul 19, 2024 at 5:48 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> 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:

> this problem is still there, after commit
> 580f8727ca93b7b9a2ce49746b9cdbcb0a2b4a7e.

No, I believe I fixed it: the table now offers

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

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

That's different from either of the solutions discussed in this
thread, but simpler.

> <<
> It has the syntax regexp_replace(string, pattern, replacement [, start
> [, N ]] [, flags ]). (Notice that N cannot be specified unless start
> is, but flags can be given in any case.)
> <<
> doc, the above part still needs change?

AFAICS, that one is correct, so I left it alone.  (I didn't try to
merge the table's two entries into one like that, though.)

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Detailed release notes
Следующее
От: jian he
Дата:
Сообщение: Re: pgsql: Add more SQL/JSON constructor functions