Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cd42785

Browse filesBrowse 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
Copy full SHA for cd42785

File tree

Expand file treeCollapse file tree

1 file changed

+9
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-3
lines changed

‎doc/src/sgml/ref/create_collation.sgml

Copy file name to clipboardExpand all lines: doc/src/sgml/ref/create_collation.sgml
+9-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.