If there were two flip() functions, Simon, a naive one that understands
nothing more than raw codepoints, and a sophisticated one that is
"aware" of combined Unicode forms/graphemes, then the excellent would
not become the enemy of the good and the raw one could be put in place
without much
'cba', right.
I don't mean to dismiss the sophisticated version as unnecessary; rather
I was thinking there could be a "naive" flip() function where the raw
codepoints were simply reversed irrespective of whether the source
string contained combining forms, and a different, sophisticated
Simon Slavin wrote:
> On 17 Nov 2009, at 5:52pm, Igor Tandetnik wrote:
>
>> But for your goals, it has to be sortable, right? In a proper
>> Unicode collation, U+0041 U+0301 would behave quite differently from
>> U+0301 U+0041. Consider "A ' E" (where ' stands for a
>So, for example, if one wanted to find all rows where myNormalColumn
>ENDS WITH 'fi c d', one could search myFlippedColumn like this:
>
>select * from LEXICON where myFlippedColumn LIKE 'd c if%' --
>allows index use
Make this
select * from LEXICON where myFlippedColumn LIKE flip('fi c
On 17 Nov 2009, at 5:52pm, Igor Tandetnik wrote:
> But for your goals, it has to be sortable, right? In a proper Unicode
> collation, U+0041 U+0301 would behave quite differently from U+0301 U+0041.
> Consider "A ' E" (where ' stands for a combining acute accent). In most
> locales, this
Tim Romano wrote:
> Understood that an index cannot be placed on a function; I wasn't
> thinking of a "virtual field" as one can have in Oracle or MS-Access,
> or in legacy non-1NF databases such as Revelation, for example. The
> flip() function would simply be a utility
Thanks for the reply, Igor.
Understood that an index cannot be placed on a function; I wasn't
thinking of a "virtual field" as one can have in Oracle or MS-Access, or
in legacy non-1NF databases such as Revelation, for example. The flip()
function would simply be a utility that would enable me
Tim Romano wrote:
> You can accomplish this on the front-end, of course, but it would be
> much more convenient and efficient to have a built-in function.
It is difficult to define a "reverse" operation on arbitrary Unicode strings in
a useful way. E.g., consider the string 'Á' (U+0041 Lating
STARTS-WITH and ENDS-WITH searches are the bread-and-butter of
text-centric/word-centric applications (e.g. in linguistics and
philology) where you have to work with suffixes, prefixes, and
enclitic|proclitic particles quite often. You must routinely examine the
ends of strings in a wide range
9 matches
Mail list logo