Proposal to improve uniq function documentation in intarray extension

Поиск
Список
Период
Сортировка
От PG Doc comments form
Тема Proposal to improve uniq function documentation in intarray extension
Дата
Msg-id 165407884456.573551.8779012279828726162@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: Proposal to improve uniq function documentation in intarray extension  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-docs
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/intarray.html
Description:

The **uniq** function in the **intarray** extension removes **adjacent**
duplicates from an integer array. The documentation[0] about this behavior
is correct, but the example is a bit misleading, because it sorts the array
before applying uniq. The sort can be overlooked **easily** and leads to the
impression that **uniq** removes all duplicates from the array.

I propse to change the example to somthing like that:

  uniq('{1,2,2,3,1,1}'::integer[]) → {1,2,3,1}

It might be a good idea to refer to the **sort** function in case one wants
to remove all duplicates.

Cheers, Martin Kalcher

[0]
https://www.postgresql.org/docs/current/intarray.html#INTARRAY-FUNC-TABLE

В списке pgsql-docs по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Should we really recommend "-A md5 or -A password"?
Следующее
От: jian he
Дата:
Сообщение: pg_stat_database view column xact_commit description should be more descriptive?