Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit cd42785

Browse files
committed
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>
1 parent 4701036 commit cd42785

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

doc/src/sgml/ref/create_collation.sgml

+9-3
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,17 @@ CREATE COLLATION german_phonebook (provider = icu, locale = 'de-u-co-phonebk');
243243
</para>
244244

245245
<para>
246-
To create a collation using the ICU provider, based on the English ICU
247-
locale, with custom rules:
246+
To create a collation using the ICU provider, based on the root ICU locale,
247+
with custom rules:
248248
<programlisting>
249-
<![CDATA[CREATE COLLATION en_custom (provider = icu, locale = 'en', rules = '&a < g');]]>
249+
<![CDATA[CREATE COLLATION custom (provider = icu, locale = 'und', rules = '&V << w <<< W');]]>
250250
</programlisting>
251+
With this rule, the letter <quote>W</quote> is sorted after
252+
<quote>V</quote>, but is treated as a secondary difference similar to an
253+
accent. Rules like this are contained in the locale definitions of some
254+
languages. (Of course, if a locale definition already contains the desired
255+
rules, then they don't need to be specified again explicitly.) See the ICU
256+
documentation for further details and examples on the rules syntax.
251257
</para>
252258

253259
<para>

0 commit comments

Comments
 (0)