]> granicus.if.org Git - postgresql/commitdiff
Update statement about sorting of character-string data.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 29 Jan 2012 01:54:56 +0000 (20:54 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
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;
    </para>
 
    <para>
-    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 <literal>COLLATE</> clause in the
+    <replaceable class="parameter">expression</replaceable>, for example
+    <literal>ORDER BY mycolumn COLLATE "en_US"</>.
+    For more information see <xref linkend="sql-syntax-collate-exprs"> and
+    <xref linkend="collation">.
    </para>
   </refsect2>