Re: add function argument names to regex* functions.
От | Robert Haas |
---|---|
Тема | Re: add function argument names to regex* functions. |
Дата | |
Msg-id | CA+TgmoZ=1i530cZ-xTCVi+76fMjN+6azp=_Lii+W+9ba9jJJTQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: add function argument names to regex* functions. ("David G. Johnston" <david.g.johnston@gmail.com>) |
Ответы |
Re: add function argument names to regex* functions.
|
Список | pgsql-hackers |
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 thatthe 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? > N - The label provides zero context as to what the number you place there is going to be used for. Labels ideally do morework than this especially if someone takes the time to spell them out. Otherwise why use "pattern" instead of "p". I feel like you're attacking a straw man here. I never said that N was my first choice; in fact, I said the opposite. But I do think that if the documentation says, as it does, that the function is regexp_replace(source, pattern, replacement, start, N, flags), a reader who has some idea what a function called regexp_replace might do will probably be able to guess what N is. It's probably also true that if we changed "pattern" to "p" they would still be able to guess that too, because there's nothing other than a pattern that you'd expect to pass to a regexp-replacement function that starts with p, but it would still be worse than what we have now. -- Robert Haas EDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: