count_distinct

An alternative to COUNT(DISTINCT …) aggregate, usable with HashAggregate

Overview

MIXED 3rd Party Extension: count_distinct : An alternative to COUNT(DISTINCT …) aggregate, usable with HashAggregate

Information

Metadata

  • Latest Version: 3.0.2
  • Postgres Support: 17,16,15,14,13
  • Need Load: Shared library do not need explicit loading
  • Need DDL: Need CREATE EXTENSION DDL
  • Relocatable: Can not install to arbitrary schema
  • Trusted: Untrusted, Require Superuser to Create
  • Schemas: N/A
  • Requires: N/A

RPM / DEB

  • RPM Repo: PIGSTY
  • RPM Name: count_distinct_$v*
  • RPM Ver : 3.0.2
  • RPM Deps: N/A
  • DEB Repo: PIGSTY
  • DEB Name: postgresql-$v-count-distinct
  • DEB Ver : 3.0.2
  • DEB Deps: N/A

Packages

OS Arch PG17 PG16 PG15 PG14 PG13
el8 x86_64 count_distinct_17
PIGSTY 3.0.2
count_distinct_16
PIGSTY 3.0.2
count_distinct_15
PIGSTY 3.0.2
count_distinct_14
PIGSTY 3.0.2
count_distinct_13
PIGSTY 3.0.2
el8 aarch64 count_distinct_17
PIGSTY 3.0.2
count_distinct_16
PIGSTY 3.0.2
count_distinct_15
PIGSTY 3.0.2
count_distinct_14
PIGSTY 3.0.2
count_distinct_13
PIGSTY 3.0.2
el9 x86_64 count_distinct_17
PIGSTY 3.0.2
count_distinct_16
PIGSTY 3.0.2
count_distinct_15
PIGSTY 3.0.2
count_distinct_14
PIGSTY 3.0.2
count_distinct_13
PIGSTY 3.0.2
el9 aarch64 count_distinct_17
PIGSTY 3.0.2
count_distinct_16
PIGSTY 3.0.2
count_distinct_15
PIGSTY 3.0.2
count_distinct_14
PIGSTY 3.0.2
count_distinct_13
PIGSTY 3.0.2
d12 x86_64 postgresql-17-count-distinct
PIGSTY 3.0.2
postgresql-16-count-distinct
PIGSTY 3.0.2
postgresql-15-count-distinct
PIGSTY 3.0.2
postgresql-14-count-distinct
PIGSTY 3.0.2
postgresql-13-count-distinct
PIGSTY 3.0.2
d12 aarch64 postgresql-17-count-distinct
PIGSTY 3.0.2
postgresql-16-count-distinct
PIGSTY 3.0.2
postgresql-15-count-distinct
PIGSTY 3.0.2
postgresql-14-count-distinct
PIGSTY 3.0.2
postgresql-13-count-distinct
PIGSTY 3.0.2
u22 x86_64 postgresql-17-count-distinct
PIGSTY 3.0.2
postgresql-16-count-distinct
PIGSTY 3.0.2
postgresql-15-count-distinct
PIGSTY 3.0.2
postgresql-14-count-distinct
PIGSTY 3.0.2
postgresql-13-count-distinct
PIGSTY 3.0.2
u22 aarch64 postgresql-17-count-distinct
PIGSTY 3.0.2
postgresql-16-count-distinct
PIGSTY 3.0.2
postgresql-15-count-distinct
PIGSTY 3.0.2
postgresql-14-count-distinct
PIGSTY 3.0.2
postgresql-13-count-distinct
PIGSTY 3.0.2
u24 x86_64 postgresql-17-count-distinct
PIGSTY 3.0.2
postgresql-16-count-distinct
PIGSTY 3.0.2
postgresql-15-count-distinct
PIGSTY 3.0.2
postgresql-14-count-distinct
PIGSTY 3.0.2
postgresql-13-count-distinct
PIGSTY 3.0.2
u24 aarch64 postgresql-17-count-distinct
PIGSTY 3.0.2
postgresql-16-count-distinct
PIGSTY 3.0.2
postgresql-15-count-distinct
PIGSTY 3.0.2
postgresql-14-count-distinct
PIGSTY 3.0.2
postgresql-13-count-distinct
PIGSTY 3.0.2

Installation

Install count_distinct via the pig CLI tool:

pig ext install count_distinct

Install count_distinct via Pigsty playbook:

./pgsql.yml -t pg_extension -e '{"pg_extensions": ["count_distinct"]}' # -l <cls>

Install count_distinct RPM from YUM repo directly:

dnf install count_distinct_17*;
dnf install count_distinct_16*;
dnf install count_distinct_15*;
dnf install count_distinct_14*;
dnf install count_distinct_13*;

Install count_distinct DEB from APT repo directly:

apt install postgresql-17-count-distinct;
apt install postgresql-16-count-distinct;
apt install postgresql-15-count-distinct;
apt install postgresql-14-count-distinct;
apt install postgresql-13-count-distinct;

Enable count_distinct extension on PostgreSQL cluster:

CREATE EXTENSION count_distinct;




Last modified 2025-02-17: add extension part (cfa504b)