count_distinct
count_distinct
An alternative to COUNT(DISTINCT …) aggregate, usable with HashAggregate
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 4630 | count_distinct | count_distinct | 3.0.2 | FUNC | BSD 2-Clause | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
--s-d-r | No | Yes | No | Yes | yes | no |
| Relationships | |
|---|---|
| See Also | topn hll omnisketch ddsketch quantile lower_quantile first_last_agg aggs_for_arrays |
no pg14,13,12 on el8/9 pgdg
Packages
| Type | Repo | Version | PG Major Availability | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EL | PIGSTY | 3.0.2 | 18 17 16 15 14 13 | count_distinct_$v* | - |
| Debian | PIGSTY | 3.0.2 | 18 17 16 15 14 13 | postgresql-$v-count-distinct | - |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 | PG13 |
|---|---|---|---|---|---|---|
el8.x86_64 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 |
el8.aarch64 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 |
el9.x86_64 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 |
el9.aarch64 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 |
el10.x86_64 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 |
el10.aarch64 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 |
d12.x86_64 | MISS | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 |
d12.aarch64 | MISS | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 |
d13.x86_64 | MISS | MISS | MISS | MISS | MISS | MISS |
d13.aarch64 | MISS | MISS | MISS | MISS | MISS | MISS |
u22.x86_64 | MISS | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 |
u22.aarch64 | MISS | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 |
u24.x86_64 | MISS | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 |
u24.aarch64 | MISS | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 | PIGSTY 3.0.2 |
| Package | Version | OS | ORG | SIZE | File URL |
|---|---|---|---|---|---|
count_distinct_18 | 3.0.2 | el8.x86_64 | pigsty | 16.8 KiB | count_distinct_18-3.0.2-1PIGSTY.el8.x86_64.rpm |
count_distinct_18 | 3.0.2 | el8.x86_64 | pgdg | 23.1 KiB | count_distinct_18-3.0.2-1PGDG.rhel8.x86_64.rpm |
count_distinct_18 | 3.0.2 | el8.aarch64 | pigsty | 16.6 KiB | count_distinct_18-3.0.2-1PIGSTY.el8.aarch64.rpm |
count_distinct_18 | 3.0.2 | el8.aarch64 | pgdg | 22.8 KiB | count_distinct_18-3.0.2-1PGDG.rhel8.aarch64.rpm |
count_distinct_18 | 3.0.2 | el9.x86_64 | pigsty | 16.6 KiB | count_distinct_18-3.0.2-1PIGSTY.el9.x86_64.rpm |
count_distinct_18 | 3.0.2 | el9.x86_64 | pgdg | 22.9 KiB | count_distinct_18-3.0.2-1PGDG.rhel9.x86_64.rpm |
count_distinct_18 | 3.0.2 | el9.aarch64 | pigsty | 16.5 KiB | count_distinct_18-3.0.2-1PIGSTY.el9.aarch64.rpm |
count_distinct_18 | 3.0.2 | el9.aarch64 | pgdg | 22.3 KiB | count_distinct_18-3.0.2-1PGDG.rhel9.aarch64.rpm |
count_distinct_18 | 3.0.2 | el10.x86_64 | pigsty | 16.7 KiB | count_distinct_18-3.0.2-1PIGSTY.el10.x86_64.rpm |
count_distinct_18 | 3.0.2 | el10.x86_64 | pgdg | 23.3 KiB | count_distinct_18-3.0.2-1PGDG.rhel10.x86_64.rpm |
count_distinct_18 | 3.0.2 | el10.aarch64 | pigsty | 16.6 KiB | count_distinct_18-3.0.2-1PIGSTY.el10.aarch64.rpm |
count_distinct_18 | 3.0.2 | el10.aarch64 | pgdg | 22.9 KiB | count_distinct_18-3.0.2-1PGDG.rhel10.aarch64.rpm |
| Package | Version | OS | ORG | SIZE | File URL |
|---|---|---|---|---|---|
count_distinct_17 | 3.0.2 | el8.x86_64 | pigsty | 16.8 KiB | count_distinct_17-3.0.2-1PIGSTY.el8.x86_64.rpm |
count_distinct_17 | 3.0.1 | el8.x86_64 | pgdg | 20.7 KiB | count_distinct_17-3.0.1-6PGDG.rhel8.x86_64.rpm |
count_distinct_17 | 3.0.2 | el8.aarch64 | pigsty | 16.6 KiB | count_distinct_17-3.0.2-1PIGSTY.el8.aarch64.rpm |
count_distinct_17 | 3.0.1 | el8.aarch64 | pgdg | 20.4 KiB | count_distinct_17-3.0.1-6PGDG.rhel8.aarch64.rpm |
count_distinct_17 | 3.0.2 | el9.x86_64 | pigsty | 16.6 KiB | count_distinct_17-3.0.2-1PIGSTY.el9.x86_64.rpm |
count_distinct_17 | 3.0.1 | el9.x86_64 | pgdg | 20.6 KiB | count_distinct_17-3.0.1-6PGDG.rhel9.x86_64.rpm |
count_distinct_17 | 3.0.2 | el9.aarch64 | pigsty | 16.5 KiB | count_distinct_17-3.0.2-1PIGSTY.el9.aarch64.rpm |
count_distinct_17 | 3.0.1 | el9.aarch64 | pgdg | 20.2 KiB | count_distinct_17-3.0.1-6PGDG.rhel9.aarch64.rpm |
count_distinct_17 | 3.0.2 | el10.x86_64 | pigsty | 16.7 KiB | count_distinct_17-3.0.2-1PIGSTY.el10.x86_64.rpm |
count_distinct_17 | 3.0.2 | el10.x86_64 | pgdg | 23.3 KiB | count_distinct_17-3.0.2-1PGDG.rhel10.x86_64.rpm |
count_distinct_17 | 3.0.2 | el10.aarch64 | pigsty | 16.6 KiB | count_distinct_17-3.0.2-1PIGSTY.el10.aarch64.rpm |
count_distinct_17 | 3.0.2 | el10.aarch64 | pgdg | 22.9 KiB | count_distinct_17-3.0.2-1PGDG.rhel10.aarch64.rpm |
postgresql-17-count-distinct | 3.0.2 | d12.x86_64 | pigsty | 35.5 KiB | postgresql-17-count-distinct_3.0.2-1PIGSTY~bookworm_amd64.deb |
postgresql-17-count-distinct | 3.0.2 | d12.aarch64 | pigsty | 35.3 KiB | postgresql-17-count-distinct_3.0.2-1PIGSTY~bookworm_arm64.deb |
postgresql-17-count-distinct | 3.0.2 | u22.x86_64 | pigsty | 37.4 KiB | postgresql-17-count-distinct_3.0.2-1PIGSTY~jammy_amd64.deb |
postgresql-17-count-distinct | 3.0.2 | u22.aarch64 | pigsty | 37.3 KiB | postgresql-17-count-distinct_3.0.2-1PIGSTY~jammy_arm64.deb |
postgresql-17-count-distinct | 3.0.2 | u24.x86_64 | pigsty | 35.8 KiB | postgresql-17-count-distinct_3.0.2-1PIGSTY~noble_amd64.deb |
postgresql-17-count-distinct | 3.0.2 | u24.aarch64 | pigsty | 35.5 KiB | postgresql-17-count-distinct_3.0.2-1PIGSTY~noble_arm64.deb |
| Package | Version | OS | ORG | SIZE | File URL |
|---|---|---|---|---|---|
count_distinct_16 | 3.0.2 | el8.x86_64 | pigsty | 16.8 KiB | count_distinct_16-3.0.2-1PIGSTY.el8.x86_64.rpm |
count_distinct_16 | 3.0.1 | el8.x86_64 | pgdg | 20.6 KiB | count_distinct_16-3.0.1-5PGDG.rhel8.x86_64.rpm |
count_distinct_16 | 3.0.2 | el8.aarch64 | pigsty | 16.6 KiB | count_distinct_16-3.0.2-1PIGSTY.el8.aarch64.rpm |
count_distinct_16 | 3.0.1 | el8.aarch64 | pgdg | 20.3 KiB | count_distinct_16-3.0.1-5PGDG.rhel8.aarch64.rpm |
count_distinct_16 | 3.0.2 | el9.x86_64 | pigsty | 16.6 KiB | count_distinct_16-3.0.2-1PIGSTY.el9.x86_64.rpm |
count_distinct_16 | 3.0.1 | el9.x86_64 | pgdg | 20.4 KiB | count_distinct_16-3.0.1-5PGDG.rhel9.x86_64.rpm |
count_distinct_16 | 3.0.2 | el9.aarch64 | pigsty | 16.5 KiB | count_distinct_16-3.0.2-1PIGSTY.el9.aarch64.rpm |
count_distinct_16 | 3.0.1 | el9.aarch64 | pgdg | 19.8 KiB | count_distinct_16-3.0.1-5PGDG.rhel9.aarch64.rpm |
count_distinct_16 | 3.0.2 | el10.x86_64 | pigsty | 16.7 KiB | count_distinct_16-3.0.2-1PIGSTY.el10.x86_64.rpm |
count_distinct_16 | 3.0.2 | el10.x86_64 | pgdg | 23.3 KiB | count_distinct_16-3.0.2-1PGDG.rhel10.x86_64.rpm |
count_distinct_16 | 3.0.2 | el10.aarch64 | pigsty | 16.6 KiB | count_distinct_16-3.0.2-1PIGSTY.el10.aarch64.rpm |
count_distinct_16 | 3.0.2 | el10.aarch64 | pgdg | 22.9 KiB | count_distinct_16-3.0.2-1PGDG.rhel10.aarch64.rpm |
postgresql-16-count-distinct | 3.0.2 | d12.x86_64 | pigsty | 35.5 KiB | postgresql-16-count-distinct_3.0.2-1PIGSTY~bookworm_amd64.deb |
postgresql-16-count-distinct | 3.0.2 | d12.aarch64 | pigsty | 35.3 KiB | postgresql-16-count-distinct_3.0.2-1PIGSTY~bookworm_arm64.deb |
postgresql-16-count-distinct | 3.0.2 | u22.x86_64 | pigsty | 37.4 KiB | postgresql-16-count-distinct_3.0.2-1PIGSTY~jammy_amd64.deb |
postgresql-16-count-distinct | 3.0.2 | u22.aarch64 | pigsty | 37.3 KiB | postgresql-16-count-distinct_3.0.2-1PIGSTY~jammy_arm64.deb |
postgresql-16-count-distinct | 3.0.2 | u24.x86_64 | pigsty | 35.8 KiB | postgresql-16-count-distinct_3.0.2-1PIGSTY~noble_amd64.deb |
postgresql-16-count-distinct | 3.0.2 | u24.aarch64 | pigsty | 35.5 KiB | postgresql-16-count-distinct_3.0.2-1PIGSTY~noble_arm64.deb |
| Package | Version | OS | ORG | SIZE | File URL |
|---|---|---|---|---|---|
count_distinct_15 | 3.0.2 | el8.x86_64 | pigsty | 16.7 KiB | count_distinct_15-3.0.2-1PIGSTY.el8.x86_64.rpm |
count_distinct_15 | 3.0.1 | el8.x86_64 | pgdg | 31.7 KiB | count_distinct_15-3.0.1-3.rhel8.x86_64.rpm |
count_distinct_15 | 3.0.2 | el8.aarch64 | pigsty | 16.6 KiB | count_distinct_15-3.0.2-1PIGSTY.el8.aarch64.rpm |
count_distinct_15 | 3.0.1 | el8.aarch64 | pgdg | 31.2 KiB | count_distinct_15-3.0.1-3.rhel8.aarch64.rpm |
count_distinct_15 | 3.0.2 | el9.x86_64 | pigsty | 16.7 KiB | count_distinct_15-3.0.2-1PIGSTY.el9.x86_64.rpm |
count_distinct_15 | 3.0.1 | el9.x86_64 | pgdg | 32.4 KiB | count_distinct_15-3.0.1-3.rhel9.x86_64.rpm |
count_distinct_15 | 3.0.2 | el9.aarch64 | pigsty | 16.4 KiB | count_distinct_15-3.0.2-1PIGSTY.el9.aarch64.rpm |
count_distinct_15 | 3.0.1 | el9.aarch64 | pgdg | 31.6 KiB | count_distinct_15-3.0.1-3.rhel9.aarch64.rpm |
count_distinct_15 | 3.0.2 | el10.x86_64 | pigsty | 16.6 KiB | count_distinct_15-3.0.2-1PIGSTY.el10.x86_64.rpm |
count_distinct_15 | 3.0.2 | el10.x86_64 | pgdg | 23.2 KiB | count_distinct_15-3.0.2-1PGDG.rhel10.x86_64.rpm |
count_distinct_15 | 3.0.2 | el10.aarch64 | pigsty | 16.6 KiB | count_distinct_15-3.0.2-1PIGSTY.el10.aarch64.rpm |
count_distinct_15 | 3.0.2 | el10.aarch64 | pgdg | 22.9 KiB | count_distinct_15-3.0.2-1PGDG.rhel10.aarch64.rpm |
postgresql-15-count-distinct | 3.0.2 | d12.x86_64 | pigsty | 35.3 KiB | postgresql-15-count-distinct_3.0.2-1PIGSTY~bookworm_amd64.deb |
postgresql-15-count-distinct | 3.0.2 | d12.aarch64 | pigsty | 35.1 KiB | postgresql-15-count-distinct_3.0.2-1PIGSTY~bookworm_arm64.deb |
postgresql-15-count-distinct | 3.0.2 | u22.x86_64 | pigsty | 37.1 KiB | postgresql-15-count-distinct_3.0.2-1PIGSTY~jammy_amd64.deb |
postgresql-15-count-distinct | 3.0.2 | u22.aarch64 | pigsty | 37.1 KiB | postgresql-15-count-distinct_3.0.2-1PIGSTY~jammy_arm64.deb |
postgresql-15-count-distinct | 3.0.2 | u24.x86_64 | pigsty | 35.6 KiB | postgresql-15-count-distinct_3.0.2-1PIGSTY~noble_amd64.deb |
postgresql-15-count-distinct | 3.0.2 | u24.aarch64 | pigsty | 35.4 KiB | postgresql-15-count-distinct_3.0.2-1PIGSTY~noble_arm64.deb |
| Package | Version | OS | ORG | SIZE | File URL |
|---|---|---|---|---|---|
count_distinct_14 | 3.0.2 | el8.x86_64 | pigsty | 16.7 KiB | count_distinct_14-3.0.2-1PIGSTY.el8.x86_64.rpm |
count_distinct_14 | 3.0.1 | el8.x86_64 | pgdg | 32.1 KiB | count_distinct_14-3.0.1-3.rhel8.x86_64.rpm |
count_distinct_14 | 3.0.2 | el8.aarch64 | pigsty | 16.6 KiB | count_distinct_14-3.0.2-1PIGSTY.el8.aarch64.rpm |
count_distinct_14 | 3.0.1 | el8.aarch64 | pgdg | 31.1 KiB | count_distinct_14-3.0.1-3.rhel8.aarch64.rpm |
count_distinct_14 | 3.0.2 | el9.x86_64 | pigsty | 16.6 KiB | count_distinct_14-3.0.2-1PIGSTY.el9.x86_64.rpm |
count_distinct_14 | 3.0.2 | el9.aarch64 | pigsty | 16.4 KiB | count_distinct_14-3.0.2-1PIGSTY.el9.aarch64.rpm |
count_distinct_14 | 3.0.1 | el9.aarch64 | pgdg | 31.7 KiB | count_distinct_14-3.0.1-3.rhel9.aarch64.rpm |
count_distinct_14 | 3.0.2 | el10.x86_64 | pigsty | 16.6 KiB | count_distinct_14-3.0.2-1PIGSTY.el10.x86_64.rpm |
count_distinct_14 | 3.0.2 | el10.x86_64 | pgdg | 23.2 KiB | count_distinct_14-3.0.2-1PGDG.rhel10.x86_64.rpm |
count_distinct_14 | 3.0.2 | el10.aarch64 | pigsty | 16.5 KiB | count_distinct_14-3.0.2-1PIGSTY.el10.aarch64.rpm |
count_distinct_14 | 3.0.2 | el10.aarch64 | pgdg | 22.9 KiB | count_distinct_14-3.0.2-1PGDG.rhel10.aarch64.rpm |
postgresql-14-count-distinct | 3.0.2 | d12.x86_64 | pigsty | 35.3 KiB | postgresql-14-count-distinct_3.0.2-1PIGSTY~bookworm_amd64.deb |
postgresql-14-count-distinct | 3.0.2 | d12.aarch64 | pigsty | 35.1 KiB | postgresql-14-count-distinct_3.0.2-1PIGSTY~bookworm_arm64.deb |
postgresql-14-count-distinct | 3.0.2 | u22.x86_64 | pigsty | 37.1 KiB | postgresql-14-count-distinct_3.0.2-1PIGSTY~jammy_amd64.deb |
postgresql-14-count-distinct | 3.0.2 | u22.aarch64 | pigsty | 37.0 KiB | postgresql-14-count-distinct_3.0.2-1PIGSTY~jammy_arm64.deb |
postgresql-14-count-distinct | 3.0.2 | u24.x86_64 | pigsty | 35.5 KiB | postgresql-14-count-distinct_3.0.2-1PIGSTY~noble_amd64.deb |
postgresql-14-count-distinct | 3.0.2 | u24.aarch64 | pigsty | 35.4 KiB | postgresql-14-count-distinct_3.0.2-1PIGSTY~noble_arm64.deb |
| Package | Version | OS | ORG | SIZE | File URL |
|---|---|---|---|---|---|
count_distinct_13 | 3.0.2 | el8.x86_64 | pigsty | 16.6 KiB | count_distinct_13-3.0.2-1PIGSTY.el8.x86_64.rpm |
count_distinct_13 | 3.0.2 | el8.aarch64 | pigsty | 16.6 KiB | count_distinct_13-3.0.2-1PIGSTY.el8.aarch64.rpm |
count_distinct_13 | 3.0.1 | el8.aarch64 | pgdg | 31.1 KiB | count_distinct_13-3.0.1-3.rhel8.aarch64.rpm |
count_distinct_13 | 3.0.2 | el9.x86_64 | pigsty | 16.6 KiB | count_distinct_13-3.0.2-1PIGSTY.el9.x86_64.rpm |
count_distinct_13 | 3.0.2 | el9.aarch64 | pigsty | 16.5 KiB | count_distinct_13-3.0.2-1PIGSTY.el9.aarch64.rpm |
count_distinct_13 | 3.0.1 | el9.aarch64 | pgdg | 31.7 KiB | count_distinct_13-3.0.1-3.rhel9.aarch64.rpm |
count_distinct_13 | 3.0.2 | el10.x86_64 | pigsty | 16.6 KiB | count_distinct_13-3.0.2-1PIGSTY.el10.x86_64.rpm |
count_distinct_13 | 3.0.2 | el10.x86_64 | pgdg | 23.2 KiB | count_distinct_13-3.0.2-1PGDG.rhel10.x86_64.rpm |
count_distinct_13 | 3.0.2 | el10.aarch64 | pigsty | 16.5 KiB | count_distinct_13-3.0.2-1PIGSTY.el10.aarch64.rpm |
count_distinct_13 | 3.0.2 | el10.aarch64 | pgdg | 22.9 KiB | count_distinct_13-3.0.2-1PGDG.rhel10.aarch64.rpm |
postgresql-13-count-distinct | 3.0.2 | d12.x86_64 | pigsty | 35.2 KiB | postgresql-13-count-distinct_3.0.2-1PIGSTY~bookworm_amd64.deb |
postgresql-13-count-distinct | 3.0.2 | d12.aarch64 | pigsty | 34.9 KiB | postgresql-13-count-distinct_3.0.2-1PIGSTY~bookworm_arm64.deb |
postgresql-13-count-distinct | 3.0.2 | u22.x86_64 | pigsty | 37.1 KiB | postgresql-13-count-distinct_3.0.2-1PIGSTY~jammy_amd64.deb |
postgresql-13-count-distinct | 3.0.2 | u22.aarch64 | pigsty | 36.8 KiB | postgresql-13-count-distinct_3.0.2-1PIGSTY~jammy_arm64.deb |
postgresql-13-count-distinct | 3.0.2 | u24.x86_64 | pigsty | 35.5 KiB | postgresql-13-count-distinct_3.0.2-1PIGSTY~noble_amd64.deb |
postgresql-13-count-distinct | 3.0.2 | u24.aarch64 | pigsty | 35.1 KiB | postgresql-13-count-distinct_3.0.2-1PIGSTY~noble_arm64.deb |
Source
pig build get count_distinct; # get count_distinct source code
pig build dep count_distinct; # install build dependencies
pig build pkg count_distinct; # build extension rpm or deb
pig build ext count_distinct; # build extension rpmsInstall
To add the required PGDG / PIGSTY upstream repository, use:
pig repo add pgsql -u # add PGDG + Pigsty repo and update cache (leave existing repos)Install this extension with:
pig ext install count_distinct; # install by extension name, for the current active PG version
pig ext install count_distinct; # install via package alias, for the active PG version
pig ext install count_distinct -v 18; # install for PG 18
pig ext install count_distinct -v 17; # install for PG 17
pig ext install count_distinct -v 16; # install for PG 16
pig ext install count_distinct -v 15; # install for PG 15
pig ext install count_distinct -v 14; # install for PG 14
pig ext install count_distinct -v 13; # install for PG 13Create this extension with:
CREATE EXTENSION count_distinct;Last updated on