| From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Palle Girgensohn <girgen(at)partitur(dot)se>, <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Multilingual application, ORDER BY w/ different locales? |
| Date: | 2001-11-17 21:13:15 |
| Message-ID: | 20011117131146.I31141-100000@megazone23.bigpanda.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sat, 17 Nov 2001, Tom Lane wrote:
> Palle Girgensohn <girgen(at)partitur(dot)se> writes:
> > My need is really to get different sorting on *the same* column, depending
> > on which locale the present user prefers.
> > ... I guess this is not even supported by the SQL standard, or
> > any other RDBMS for that matter, right?
>
> I believe SQL regards the locale as essentially a property of a
> datatype, which means that in theory you should be able to cast a column
> value to type text-with-locale-X and then ORDER BY that. It'd be an
> on-the-fly sort, not able to exploit any indexes, but it sounds like
> that's acceptable to you.
Would it be possible to make a function in plpgsql or whatever that
wrapped the collate changes and then order by that and make functional
indexes? Would the system use it?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2001-11-17 21:21:58 | Re: Multilingual application, ORDER BY w/ different locales? |
| Previous Message | Bruce Momjian | 2001-11-17 20:19:31 | Open items |