sha256_agg
Ordered SHA-256 aggregation over logical PostgreSQL rows.
sha256_agg · Ordered SHA-256 aggregation over logical PostgreSQL rows.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102153 | sha256_agg | sha256_agg | 1.0 | FUNC | MIT | C |
PostgreSQL · 14, 15, 16, 17, 18
Usage
Sources:
sha256_agg computes a single digest over ordered rows or selected values, for comparing logical table contents across copies.
Core Workflow
Operational Boundaries
Use a unique ordering key inside the aggregate. Empty input returns NULL; a row of NULL values still changes the digest. Comparisons require the same endianness. sha256_agg_encode exposes the hashed row bytes, and sha256_agg_kernel identifies the active implementation. sha256_agg.hardware_acceleration can disable acceleration without changing results. There is no partial/parallel aggregation. Upstream targets PostgreSQL 14+, with tests reported on 18 and master; the control is trusted and relocatable.