Content-Length: 278716 | pFad | http://github.com/postgrespro/postgres/commit/cd427859745af4574d75e37ec7d427ccd2b8b24a

E3 doc: Better example for custom ICU rules · postgrespro/postgres@cd42785 · GitHub
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

Lines changed: 9 additions & 3 deletions
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/cd427859745af4574d75e37ec7d427ccd2b8b24a

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy