Re: Multilingual application, ORDER BY w/ different locales?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Multilingual application, ORDER BY w/ different locales?
Дата
Msg-id 20011117131146.I31141-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: Multilingual application, ORDER BY w/ different locales?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sat, 17 Nov 2001, Tom Lane wrote:

> Palle Girgensohn <girgen@partitur.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?



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Multilingual application, ORDER BY w/ different locales?
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Multilingual application, ORDER BY w/ different locales?