From: | "Marc G(dot) Fournier" <scrappy(at)hub(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Thomas Lockhart <lockhart(at)fourpalms(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: The TODO List (Was: Re: Open 7.3 items) |
Date: | 2002-09-19 04:40:09 |
Message-ID: | 20020919013541.J53125-100000@hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 18 Sep 2002, Tom Lane wrote:
> "Marc G. Fournier" <scrappy(at)hub(dot)org> writes:
> > I'm in agreement with Thomas here ... unless a problem has been defined a
> > bit more specifically then 'it isn't posix compliant', it shouldn't be
> > considered an open item ... please remove?
>
> A quick review of SQL99 says that their notion of SIMILAR TO patterns
> is an unholy witches' brew: it does *both* common-or-garden regexp
> expressions and LIKE patterns. Specifically, I see these
> metacharacters:
>
> | OR (regexp-ish)
>
> * repeat 0 or more times (regexp-ish)
>
> + repeat 1 or more times (regexp-ish)
>
> % match any character sequence (like LIKE)
>
> _ match any one character (like LIKE)
>
> [...] almost-but-not-quite-regexp-ish character class
>
> (...) grouping (regexp-ish)
>
> plus a just-like-LIKE treatment of a selectable escape character.
>
> But the most important variation from common regex practice is that
> (if I'm reading the spec correctly) the pattern must match to the
> entire target string --- ie, it's effectively both left- and right-
> anchored. This is like LIKE patterns but utterly unlike common regexp
> usage.
>
> I could live with the fact that our regexp patterns don't implement all
> of the spec-mandated metacharacters. But I do not think we can ignore
> the difference in anchoring behavior. This is not a subset of the spec
> behavior, it is just plain wrong.
>
> I vote with Peter: we fix this or we disable it before 7.3 release.
> It is not anywhere near spec compliant, and we will be doing no one
> a favor by releasing it in the current state.
What would it take to get it to a fixed state? Who implemented SIMILAR TO
in the first place? Who is able to fix this? And, finally, what are the
implications of leaving things as they are?
From my read of what you are saying above, its currently implemented with
an implied ^ and $ around the pattern match?
From | Date | Subject | |
---|---|---|---|
Next Message | Marc G. Fournier | 2002-09-19 04:42:54 | Re: The TODO List (Was: Re: Open 7.3 items) |
Previous Message | Marc G. Fournier | 2002-09-19 04:34:38 | Re: Beta2 on Friday Morning (Was: Re: Open 7.3 items) |