Re: sorting RTL languages.

From: Dennis Gearon <gearond(at)cvc(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>, Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my>
Cc: Amir Hardon <hardon(at)actcom(dot)co(dot)il>, pgsql-general(at)postgresql(dot)org
Subject: Re: sorting RTL languages.
Date: 2003-02-03 16:18:24
Message-ID: J9304A8YV2X622YGAIC7DC8RTSZW.3e3e9650@cal-lab
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I think that the SQL standard should be extended to include:

blah blah blah ORDER::COLLATION BY blah blah blah

-OR-

blah blah blah ORDER(COLLATION) BY blah blah blah

It would require the engine to have the collation in its system tables. Other collaltions
could be inserted, written. For example, 'US-EN-NA'=>US English, Numeric Alpha ordering. So
any database could order any language based on tables. The local user would not even have to
have the font to display it, if they weren't interested in displaying it.

I will probably write to the SQL standards board someday soon to propose this.

2/2/2003 7:42:53 PM, Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my> wrote:

>At 04:08 PM 2/2/03 -0500, Tom Lane wrote:
>
>>Well, if it was *only* a matter of rtl then he could do
>> ORDER BY reverse(foo)
>>I don't think we have a string-reversing function (reverse('foo') = 'oof')
>>at the moment, but one would be easy to write.
>>
>>But I'm assuming the rtl property is just one of the ways in which
>>Hebraic sorting differs from plain ASCII... so he really needs a locale.
>
>Or an imaginary function: order by lang_order('hebrew',foo)
>
>Where lang order converts stuff so that in a C locale it's ordered correctly.
>
>Is that sort of thing possible? There'd be a performance penalty, but it
>could allow better flexibility.
>
>Link.
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nigel J. Andrews 2003-02-03 16:58:30 Re: DBI driver and transactions
Previous Message Jean-Luc Lachance 2003-02-03 16:15:00 Re: Postgres server output logfile