mirror of
https://github.com/postgres/postgres.git
synced 2025-04-27 22:56:53 +03:00
Doc: improve example for intarray's uniq() function.
The previous entry invited confusion between what uniq() does by itself and what it does when combined with sort(). The latter usage is pretty useful so we should show it, but add an additional example to clarify the results of uniq() alone. Per suggestion from Martin Kalcher. Back-patch to v13, where we switched to formatting that supports multiple examples. Discussion: https://postgr.es/m/165407884456.573551.8779012279828726162@wrigleys.postgresql.org
This commit is contained in:
parent
94c7db4f1d
commit
4ecacc3c8c
@ -131,6 +131,11 @@
|
||||
</para>
|
||||
<para>
|
||||
Removes adjacent duplicates.
|
||||
Often used with <function>sort</function> to remove all duplicates.
|
||||
</para>
|
||||
<para>
|
||||
<literal>uniq('{1,2,2,3,1,1}'::integer[])</literal>
|
||||
<returnvalue>{1,2,3,1}</returnvalue>
|
||||
</para>
|
||||
<para>
|
||||
<literal>uniq(sort('{1,2,3,2,1}'::integer[]))</literal>
|
||||
|
Loading…
x
Reference in New Issue
Block a user