Re: add function argument name to substring and substr

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: add function argument name to substring and substr
Date: 2025-04-01 14:40:44
Message-ID: CAKFQuwYSRa_Q-qpXMosT4HYx62aGjkiNA2A-d6dZhzTamHs6dw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 1, 2025 at 6:15 AM Marcos Pegoraro <marcos(at)f10(dot)com(dot)br> wrote:

> Em ter., 1 de abr. de 2025 às 02:00, David G. Johnston <
> david(dot)g(dot)johnston(at)gmail(dot)com> escreveu:
>
> Wouldn't it be good to add the use of parentheses using posix ? It's
> useful and rarely documented
> <literal>substring('Thomas', '...$')</literal>
> + <literal>substring('Email: johnjohn(at)mymail(dot)com, Name: John' from
> '@(.*), Name')</literal>
>
>
Agreed. A second example using () would be good here.

Was pondering explaining the "no parentheses" case here; but for someone
familiar with PREs the behavior is obvious and everyone else has the link
needed to learn what is happening.

David J.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Shlok Kyal 2025-04-01 14:48:21 Re: Restrict publishing of partitioned table with a foreign table as partition
Previous Message Matthias van de Meent 2025-04-01 14:39:47 Re: Adding skip scan (including MDAM style range skip scan) to nbtree