Update statement about sorting of character-string data.
authorTom Lane
Sun, 29 Jan 2012 01:54:56 +0000 (20:54 -0500)
committerTom Lane
Sun, 29 Jan 2012 01:54:56 +0000 (20:54 -0500)
The sort order is no longer fixed at database creation time, but can be
controlled via COLLATE.  Noted by Thomas Kellerer.

doc/src/sgml/ref/select.sgml

index 39fc6b6d830b34c4f6c2249127337ee59744b1fa..01c010462492b0a8a42e3cbbb4ab7e90d69691c9 100644 (file)
@@ -1050,8 +1050,13 @@ SELECT name FROM distributors ORDER BY code;
    
 
    
-    Character-string data is sorted according to the locale-specific
-    collation order that was established when the database was created.
+    Character-string data is sorted according to the collation that applies
+    to the column being sorted.  That can be overridden at need by including
+    a COLLATE clause in the
+    expression, for example
+    ORDER BY mycolumn COLLATE "en_US".
+    For more information see  and
+    .