From: | david(at)fetter(dot)org (David Fetter) |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Inside the Regex Engine |
Date: | 2003-12-03 22:59:33 |
Message-ID: | bfCdnbhZ6vVI91OiXTWc-g@speakeasy.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> Tom Lane wrote:
>
>>david(at)fetter(dot)org (David Fetter) writes:
>>
>>
>>>While PL/Perl is great, it's not available everywhere, and I'd like
>>>to be able to grab atoms from a regex match in, say, a SELECT. Is
>>>there some way to get access to them?
>>
>>There's a three-parameter variant of substring() that allows
>>extraction of a portion of a regex match --- unfortunately it uses
>>SQL99's brain-dead notion of regex, which will not satisfy any Perl
>>weenie :-(
>>
>>I think it'd be worth our while to define some comparable
>>functionality that depends only on the POSIX regex engine ...
>
> substitute should be relatively straightforward, I guess; split and
> match maybe less so - what do you return? An array?
That would be great.
> Or you could require an explicit subscript to get a particular
> return value as in split_part(), which would be potentially
> inefficient if you want more than one (although I guess results
> could be cached).
That'd be good, too.
Cheers
D
--
David Fetter david(at)fetter(dot)org http://fetter.org/
phone: +1 510 893 6100 cell: +1 415 235 3778
My definition of a free society is a society where it is safe to be
unpopular.
Adlai Stevenson
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Naeslund(t) | 2003-12-03 23:00:58 | PostgreSQL 7.3.4 gets killed by SIG_KILL |
Previous Message | E.Rodichev | 2003-12-03 21:36:56 | Re: Encoding problem with 7.4 |