Re: add function argument names to regex* functions.

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: add function argument names to regex* functions.
Дата
Msg-id CAKFQuwZvpKL80VfhNhCUvKwnG-mwhi1fg4iNdZ1trgjNvSxrCw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: add function argument names to regex* functions.  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: add function argument names to regex* functions.
Список pgsql-hackers
On Wed, May 15, 2024 at 12:52 PM Robert Haas <robertmhaas@gmail.com> wrote:
On Wed, May 15, 2024 at 3:25 PM David G. Johnston
<david.g.johnston@gmail.com> wrote:
> The function replaces matches, not random characters.  And if you are reading the documentation I find it implausible that the wording I suggested would cause one to think in terms of characters instead of matches.

I mean I just told you what my reaction to it was. If you find that
reaction "implausible" then I guess you think I was lying when I said
that?


You just broke my brain when you say that you read:

By default, only the first match of the pattern is replaced.  If replace_at is specified and greater than zero, then the first "replace_at - 1" matches are skipped before making a single replacement (i.e., the g flag is ignored when replace_at is specified.)

And then say:

I'd expect replace_at to be a character position or something, not an occurrence count.

I guess it isn't a claim you are lying, rather I simply don't follow your mental model of all this and in my mental model behind the proposal I don't believe the typical reader will become confused on that point.  I guess that means I don't find you to be the typical reader, at least so far as this specific topic goes.  But hey, maybe I'm the one in the minority.  In either case we disagree and that was my main point.

David J.

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Why does pgindent's README say to download typedefs.list from the buildfarm?
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: More performance improvements for pg_dump in binary upgrade mode