COLLATION_VALUE( 'string', 'encoding' )
Which could be used like:
SELECT field_a, field_b FROM table_a GROUP BY COLLATION_VALUE( field_a ) ORDER BY COLLATION_VALUE( field_b );
or in other creative ways.
Greg Stark wrote:
Tom Lane <[EMAIL PROTECTED]> writes:
Greg Stark <[EMAIL PROTECTED]> writes:
My understanding is that the entire set of localization parameters needs to beNo, not all of them are frozen. Unfortunately, the one you care about
decided upon when the initdb is done and can never be changed later. Is that
right?
(LC_COLLATE) is. The reason for this is that it determines index
ordering for textual columns, and so changing LC_COLLATE on the fly
produces instant corrupt indexes :-(
Yeah, I really would be perfectly happy to have indexes be in "C" order and have my queries have to specifically specify the sort order in the ORDER BY clause, knowing they won't use the index.
Well, ok, not quite perfectly happy. But in this case there are no indexes on the columns anyways so...
A solution for this is on the TODO list, but don't hold your breath ...
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?
http://archives.postgresql.org