From: | Jordan Gigov <coladict(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Expanding regexp_matches flags |
Date: | 2021-08-12 15:23:41 |
Message-ID: | CA+nBocCcoNfuupXCfODh2-KSuWk6E6XS=BB0AiaefD3OrQQQiA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
A recent thread gave me the idea that it would be convenient to have
another flag for `regexp_matches` to make it return a singular
two-dimensional array of matches when performing a global match.
Why? Well, basically you avoid having to aggregate the rows afterwards
using by wrapping it in a subquery.
Is there some interest in this?
The idea is to add a new flag `a` that would imply `g` internally when
performing the match, but then return an array, instead of a set. Or
more accurately it will return a set that will always have exactly one
array. The array would be empty if no matches are found, or would
contain arrays of match results otherwise.
I have not looked into implementing this yet, but I may have time in
8-9 days or so.
For now, I'm just looking if there's support or opposition to the idea.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-08-12 15:31:55 | Re: Expanding regexp_matches flags |
Previous Message | Tom Lane | 2021-08-12 15:13:17 | Re: Worth using personality(ADDR_NO_RANDOMIZE) for EXEC_BACKEND on linux? |