Re: ORDER BY 'criteria' - Mailing list pgsql-general

From Dennis Gearon
Subject Re: ORDER BY 'criteria'
Date
Msg-id 3E313096.B86D1F86@cvc.net
Whole thread Raw
In response to ORDER BY 'criteria'  (Dennis Gearon <gearond@cvc.net>)
List 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 by date:

Previous
From: Dennis Gearon
Date:
Subject: Re: I was spoiled by the MySQL timestamp field
Next
From: Tom Lane
Date:
Subject: Re: psql 7.3.1 crash