Add reusable routine for making arrays unique.

Thomas Munro <tmunro@postgresql.org>

Commit: 7815e7efdb4ce9575b5d8460beb0dd2569d7ca3a
Author: Thomas Munro <tmunro@postgresql.org>
Date: 2019-11-07T04:00:48Z
Releases: 13.0
Add reusable routine for making arrays unique.

Introduce qunique() and qunique_arg(), which can be used after qsort()
and qsort_arg() respectively to remove duplicate values.  Use it where
appropriate.

Author: Thomas Munro
Reviewed-by: Tom Lane (in an earlier version)
Discussion: https://postgr.es/m/CAEepm%3D2vmFTNpAmwbGGD2WaryM6T3hSDVKQPfUwjdD_5XY6vAA%40mail.gmail.com

Files

Discussion