pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: martin.kalcher@aboutsource.net
Subject: Proposal to improve uniq function documentation in intarray extension
Date: Wed, 01 Jun 2022 10:20:44 +0000
Message-ID: <165407884456.573551.8779012279828726162@wrigleys.postgresql.org> (raw)

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


view thread (5+ messages)  latest in thread

Message-ID: <165407884456.573551.8779012279828726162@wrigleys.postgresql.org>
Permalink:  ../165407884456.573551.8779012279828726162@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/165407884456.573551.8779012279828726162@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, martin.kalcher@aboutsource.net
  Subject: Re: Proposal to improve uniq function documentation in intarray extension
  In-Reply-To: <165407884456.573551.8779012279828726162@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox