Re: ORDER BY 'criteria'

Поиск
Список
Период
Сортировка
От Dennis Gearon
Тема Re: ORDER BY 'criteria'
Дата
Msg-id 3E313096.B86D1F86@cvc.net
обсуждение исходный текст
Ответ на ORDER BY 'criteria'  (Dennis Gearon <gearond@cvc.net>)
Список pgsql-general
I think I will write a custom C function in the future this year, that
writes a replacement value into a designated query result column that
can be the target of a binary ORDER BY based on translation from a
collation table.

Don't know how the pictogram languages work, (old egyptian, modern
chinese, korean, japanese, others), but the character based languages
would sort fine.

Example

create table ctrys_in_all_languages( -- not syntactically correct below
ID int4 primary key,
iso_lang_code blob,
ctry_name blob );

fill table; -- pseudo code

select ctry_name, sorting_column = ' function here (ctry_name, 'fr')'
from ctrys_in_all_languages
where ( iso_lang_code = 'fr' )
order by sorting_column;

discard ctry_name;
--

Carpe Dancem ;-)
-----------------------------------------------------------------
Remember your friends while they are alive
-----------------------------------------------------------------
                         Sincerely, Dennis Gearon

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

Предыдущее
От: Dennis Gearon
Дата:
Сообщение: Re: I was spoiled by the MySQL timestamp field
Следующее
От: Tom Lane
Дата:
Сообщение: Re: psql 7.3.1 crash