Thread

  1. Re: add function argument name to substring and substr

    Andrew Dunstan <andrew@dunslane.net> — 2025-10-13T14:58:30Z

    On 2025-10-13 Mo 10:22 AM, jian he wrote:
    > On Mon, Jul 21, 2025 at 2:31 PM jian he <jian.universality@gmail.com> wrote:
    >> actually,
    >> section (9.7.3.)
    >> https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-POSIX-REGEXP
    >> already have example, like:
    >> substring('foobar' from 'o(.)b')
    >>
    >> new patch attached, split substr, substring to make review more easier.
    >> v6-0001: add function argument name to function substr
    >> v6-0002: add function argument name to function substring
    >>
    >> v6-0002 incorporated some of the changes in v5-0002-v3-delta.patch.
    >> some of the changes in v5-0002-v3-delta.patch are not related to this thread,
    >> so I didn't incorporate them, right now.
    > hi.
    >
    > rebased.
    
    
    
    I'm late to the party on this, but I wonder if it wouldn't be better to 
    use a type-neutral parameter name here, like "source", which could cover 
    all these cases, instead of "string", "bytes", etc.
    
    
    cheers
    
    
    andrew
    
    --
    Andrew Dunstan
    EDB: https://www.enterprisedb.com