Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit4ecacc3

Browse files
committed
Doc: improve example for intarray's uniq() function.
The previous entry invited confusion between what uniq() doesby itself and what it does when combined with sort(). The latterusage is pretty useful so we should show it, but add an additionalexample to clarify the results of uniq() alone.Per suggestion from Martin Kalcher. Back-patch to v13, wherewe switched to formatting that supports multiple examples.Discussion:https://postgr.es/m/165407884456.573551.8779012279828726162@wrigleys.postgresql.org
1 parent94c7db4 commit4ecacc3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎doc/src/sgml/intarray.sgml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@
131131
</para>
132132
<para>
133133
Removes adjacent duplicates.
134+
Often used with <function>sort</function> to remove all duplicates.
135+
</para>
136+
<para>
137+
<literal>uniq('{1,2,2,3,1,1}'::integer[])</literal>
138+
<returnvalue>{1,2,3,1}</returnvalue>
134139
</para>
135140
<para>
136141
<literal>uniq(sort('{1,2,3,2,1}'::integer[]))</literal>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp