Search Postgresql Archives

Re: Collation problem?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 26, 2015 at 5:02 PM, Bjørn T Johansen wrote:
> And my problem is that I am using Norwegian in some tables and when using order by the sort order is not correct for the Norwegian letters..
> So my guestion is if it is possible to get the correct sort order without recreating all my databases or initialize PGSQL?

You can enforce the collate used in an ORDER BY clause:
SELECT a, b, c FROM tbl WHERE ... ORDER BY a COLLATE "C";
http://www.postgresql.org/docs/devel/static/sql-expressions.html#SQL-SYNTAX-COLLATE-EXPRS
Regards,
-- 
Michael


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux