Re: New string functions; initdb required - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: New string functions; initdb required
Date
Msg-id 3D08979B.120BE1B3@fourpalms.org
Whole thread Raw
In response to New string functions; initdb required  (Thomas Lockhart <thomas@pgsql.com>)
List pgsql-hackers
Thanks for the info! I have a question...

>  As usual: ( ) + * [ ] |
>  Instead of dot . there is underscore _
>  There is % to mean .* just like LIKE
>  There is no ? or ^ or $
>  Regular expressions match the whole string, as if there were an
>  implicit ^ before and $ after the pattern. You have to add % if
>  you want to match anywhere in a string.

Hmm. So if there are no explicit anchors then there must be a slightly
different syntax for the regular-expression version of the substring()
function? Otherwise, substrings would always have to start from the
first character, right?

Percents and underscores carried over from LIKE are really annoying.
I'll think about implementing an expression rewriter to convert SQL99 to
our modern regexp syntax.
                    - Thomas


pgsql-hackers by date:

Previous
From: Bill Huang
Date:
Subject: Re: [PATCHES] Chinese GB18030 support is implemented!
Next
From: Tom Lane
Date:
Subject: Re: Making serial survive pg_dump