From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Marc G(dot) Fournier" <scrappy(at)hub(dot)org> |
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 13:29:28 |
Message-ID: | 25263.1032442168@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Marc G. Fournier" <scrappy(at)hub(dot)org> writes:
> Who implemented SIMILAR TO in the first place?
Thomas. He put in the syntax, but as it stands it's simply syntactic
sugar for ~ --- that is, our Posix-compatible regex match operator.
Since the spec demands very non-Posix behavior, this is wrong.
AFAICS, getting SIMILAR TO to operate per spec would require adding some
sort of translation function that converts the spec-style pattern into
a Posix pattern that our regex match engine would handle. This would at
least require adding ^ and $ around the pattern, converting the escape
character if any, and translating % and _ into .* and . respectively.
There are probably some differences of detail that we'd need to fix
later, but that would get it to a state where we need not be ashamed
to release it.
We already have a similar mechanism for handling LIKE ... ESCAPE
clauses, so it doesn't seem too difficult to do. But I haven't got
time for it...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-09-19 13:31:14 | Re: The TODO List (Was: Re: Open 7.3 items) |
Previous Message | Robert Treat | 2002-09-19 13:28:51 | Re: [HACKERS] PGXLOG variable worthwhile? |