aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2023-03-10 09:25:03 +0100
committerPeter Eisentraut <peter@eisentraut.org>2023-03-10 09:25:03 +0100
commitcd427859745af4574d75e37ec7d427ccd2b8b24a (patch)
tree3a0f79096ac67d42df19c7dbc6b4ef918db2f8f9
parent470103697a17c4df516f9779fd3ff7f7c32d3cc5 (diff)
downloadpostgresql-cd427859745af4574d75e37ec7d427ccd2b8b24a.tar.gz
postgresql-cd427859745af4574d75e37ec7d427ccd2b8b24a.zip
doc: Better example for custom ICU rules
Use a more practical example, and also add some explanation. Reported-by: Jeff Davis <pgsql@j-davis.com>
-rw-r--r--doc/src/sgml/ref/create_collation.sgml12
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/src/sgml/ref/create_collation.sgml b/doc/src/sgml/ref/create_collation.sgml
index 289f8147f14..f6353da5c15 100644
--- a/doc/src/sgml/ref/create_collation.sgml
+++ b/doc/src/sgml/ref/create_collation.sgml
@@ -243,11 +243,17 @@ CREATE COLLATION german_phonebook (provider = icu, locale = 'de-u-co-phonebk');
</para>
<para>
- To create a collation using the ICU provider, based on the English ICU
- locale, with custom rules:
+ To create a collation using the ICU provider, based on the root ICU locale,
+ with custom rules:
<programlisting>
-<![CDATA[CREATE COLLATION en_custom (provider = icu, locale = 'en', rules = '&a < g');]]>
+<![CDATA[CREATE COLLATION custom (provider = icu, locale = 'und', rules = '&V << w <<< W');]]>
</programlisting>
+ With this rule, the letter <quote>W</quote> is sorted after
+ <quote>V</quote>, but is treated as a secondary difference similar to an
+ accent. Rules like this are contained in the locale definitions of some
+ languages. (Of course, if a locale definition already contains the desired
+ rules, then they don't need to be specified again explicitly.) See the ICU
+ documentation for further details and examples on the rules syntax.
</para>
<para>