column_encrypt
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
column_encrypt | 4.0 | SEC | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 7030 | column_encrypt | No | Yes | Yes | Yes | No | No | encrypt |
fixed encrypt schema; create schema encrypt before CREATE EXTENSION; preload column_encrypt;
Version
| OS / PG | PG19 | PG18 | PG17 | PG16 | PG15 |
|---|---|---|---|---|---|
| el8.x86_64 | N/A | PIGSTY 4.0 el8.x86_64.pg18 : column_encrypt_18 column_encrypt_18-4.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 4.0 el8.x86_64.pg17 : column_encrypt_17 column_encrypt_17-4.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 4.0 el8.x86_64.pg16 : column_encrypt_16 column_encrypt_16-4.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 4.0 el8.x86_64.pg15 : column_encrypt_15 column_encrypt_15-4.0-1PGSTY.el8.x86_64.rpm
|
| el8.aarch64 | N/A | PIGSTY 4.0 el8.aarch64.pg18 : column_encrypt_18 column_encrypt_18-4.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 4.0 el8.aarch64.pg17 : column_encrypt_17 column_encrypt_17-4.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 4.0 el8.aarch64.pg16 : column_encrypt_16 column_encrypt_16-4.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 4.0 el8.aarch64.pg15 : column_encrypt_15 column_encrypt_15-4.0-1PGSTY.el8.aarch64.rpm
|
| el9.x86_64 | PIGSTY 4.0 el9.x86_64.pg19 : column_encrypt_19 column_encrypt_19-4.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 4.0 el9.x86_64.pg18 : column_encrypt_18 column_encrypt_18-4.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 4.0 el9.x86_64.pg17 : column_encrypt_17 column_encrypt_17-4.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 4.0 el9.x86_64.pg16 : column_encrypt_16 column_encrypt_16-4.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 4.0 el9.x86_64.pg15 : column_encrypt_15 column_encrypt_15-4.0-1PGSTY.el9.x86_64.rpm
|
| el9.aarch64 | PIGSTY 4.0 el9.aarch64.pg19 : column_encrypt_19 column_encrypt_19-4.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 4.0 el9.aarch64.pg18 : column_encrypt_18 column_encrypt_18-4.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 4.0 el9.aarch64.pg17 : column_encrypt_17 column_encrypt_17-4.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 4.0 el9.aarch64.pg16 : column_encrypt_16 column_encrypt_16-4.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 4.0 el9.aarch64.pg15 : column_encrypt_15 column_encrypt_15-4.0-1PGSTY.el9.aarch64.rpm
|
| el10.x86_64 | PIGSTY 4.0 el10.x86_64.pg19 : column_encrypt_19 column_encrypt_19-4.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 4.0 el10.x86_64.pg18 : column_encrypt_18 column_encrypt_18-4.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 4.0 el10.x86_64.pg17 : column_encrypt_17 column_encrypt_17-4.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 4.0 el10.x86_64.pg16 : column_encrypt_16 column_encrypt_16-4.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 4.0 el10.x86_64.pg15 : column_encrypt_15 column_encrypt_15-4.0-1PGSTY.el10.x86_64.rpm
|
| el10.aarch64 | PIGSTY 4.0 el10.aarch64.pg19 : column_encrypt_19 column_encrypt_19-4.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 4.0 el10.aarch64.pg18 : column_encrypt_18 column_encrypt_18-4.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 4.0 el10.aarch64.pg17 : column_encrypt_17 column_encrypt_17-4.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 4.0 el10.aarch64.pg16 : column_encrypt_16 column_encrypt_16-4.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 4.0 el10.aarch64.pg15 : column_encrypt_15 column_encrypt_15-4.0-1PGSTY.el10.aarch64.rpm
|
| d12.x86_64 | PIGSTY 4.0 d12.x86_64.pg19 : postgresql-19-column-encrypt postgresql-19-column-encrypt_4.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 4.0 d12.x86_64.pg18 : postgresql-18-column-encrypt postgresql-18-column-encrypt_4.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 4.0 d12.x86_64.pg17 : postgresql-17-column-encrypt postgresql-17-column-encrypt_4.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 4.0 d12.x86_64.pg16 : postgresql-16-column-encrypt postgresql-16-column-encrypt_4.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 4.0 d12.x86_64.pg15 : postgresql-15-column-encrypt postgresql-15-column-encrypt_4.0-1PGSTY~bookworm_amd64.deb
|
| d12.aarch64 | PIGSTY 4.0 d12.aarch64.pg19 : postgresql-19-column-encrypt postgresql-19-column-encrypt_4.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 4.0 d12.aarch64.pg18 : postgresql-18-column-encrypt postgresql-18-column-encrypt_4.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 4.0 d12.aarch64.pg17 : postgresql-17-column-encrypt postgresql-17-column-encrypt_4.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 4.0 d12.aarch64.pg16 : postgresql-16-column-encrypt postgresql-16-column-encrypt_4.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 4.0 d12.aarch64.pg15 : postgresql-15-column-encrypt postgresql-15-column-encrypt_4.0-1PGSTY~bookworm_arm64.deb
|
| d13.x86_64 | PIGSTY 4.0 d13.x86_64.pg19 : postgresql-19-column-encrypt postgresql-19-column-encrypt_4.0-1PGSTY~trixie_amd64.deb
| PIGSTY 4.0 d13.x86_64.pg18 : postgresql-18-column-encrypt postgresql-18-column-encrypt_4.0-1PGSTY~trixie_amd64.deb
| PIGSTY 4.0 d13.x86_64.pg17 : postgresql-17-column-encrypt postgresql-17-column-encrypt_4.0-1PGSTY~trixie_amd64.deb
| PIGSTY 4.0 d13.x86_64.pg16 : postgresql-16-column-encrypt postgresql-16-column-encrypt_4.0-1PGSTY~trixie_amd64.deb
| PIGSTY 4.0 d13.x86_64.pg15 : postgresql-15-column-encrypt postgresql-15-column-encrypt_4.0-1PGSTY~trixie_amd64.deb
|
| d13.aarch64 | PIGSTY 4.0 d13.aarch64.pg19 : postgresql-19-column-encrypt postgresql-19-column-encrypt_4.0-1PGSTY~trixie_arm64.deb
| PIGSTY 4.0 d13.aarch64.pg18 : postgresql-18-column-encrypt postgresql-18-column-encrypt_4.0-1PGSTY~trixie_arm64.deb
| PIGSTY 4.0 d13.aarch64.pg17 : postgresql-17-column-encrypt postgresql-17-column-encrypt_4.0-1PGSTY~trixie_arm64.deb
| PIGSTY 4.0 d13.aarch64.pg16 : postgresql-16-column-encrypt postgresql-16-column-encrypt_4.0-1PGSTY~trixie_arm64.deb
| PIGSTY 4.0 d13.aarch64.pg15 : postgresql-15-column-encrypt postgresql-15-column-encrypt_4.0-1PGSTY~trixie_arm64.deb
|
| u22.x86_64 | PIGSTY 4.0 u22.x86_64.pg19 : postgresql-19-column-encrypt postgresql-19-column-encrypt_4.0-1PGSTY~jammy_amd64.deb
| PIGSTY 4.0 u22.x86_64.pg18 : postgresql-18-column-encrypt postgresql-18-column-encrypt_4.0-1PGSTY~jammy_amd64.deb
| PIGSTY 4.0 u22.x86_64.pg17 : postgresql-17-column-encrypt postgresql-17-column-encrypt_4.0-1PGSTY~jammy_amd64.deb
| PIGSTY 4.0 u22.x86_64.pg16 : postgresql-16-column-encrypt postgresql-16-column-encrypt_4.0-1PGSTY~jammy_amd64.deb
| PIGSTY 4.0 u22.x86_64.pg15 : postgresql-15-column-encrypt postgresql-15-column-encrypt_4.0-1PGSTY~jammy_amd64.deb
|
| u22.aarch64 | PIGSTY 4.0 u22.aarch64.pg19 : postgresql-19-column-encrypt postgresql-19-column-encrypt_4.0-1PGSTY~jammy_arm64.deb
| PIGSTY 4.0 u22.aarch64.pg18 : postgresql-18-column-encrypt postgresql-18-column-encrypt_4.0-1PGSTY~jammy_arm64.deb
| PIGSTY 4.0 u22.aarch64.pg17 : postgresql-17-column-encrypt postgresql-17-column-encrypt_4.0-1PGSTY~jammy_arm64.deb
| PIGSTY 4.0 u22.aarch64.pg16 : postgresql-16-column-encrypt postgresql-16-column-encrypt_4.0-1PGSTY~jammy_arm64.deb
| PIGSTY 4.0 u22.aarch64.pg15 : postgresql-15-column-encrypt postgresql-15-column-encrypt_4.0-1PGSTY~jammy_arm64.deb
|
| u24.x86_64 | PIGSTY 4.0 u24.x86_64.pg19 : postgresql-19-column-encrypt postgresql-19-column-encrypt_4.0-1PGSTY~noble_amd64.deb
| PIGSTY 4.0 u24.x86_64.pg18 : postgresql-18-column-encrypt postgresql-18-column-encrypt_4.0-1PGSTY~noble_amd64.deb
| PIGSTY 4.0 u24.x86_64.pg17 : postgresql-17-column-encrypt postgresql-17-column-encrypt_4.0-1PGSTY~noble_amd64.deb
| PIGSTY 4.0 u24.x86_64.pg16 : postgresql-16-column-encrypt postgresql-16-column-encrypt_4.0-1PGSTY~noble_amd64.deb
| PIGSTY 4.0 u24.x86_64.pg15 : postgresql-15-column-encrypt postgresql-15-column-encrypt_4.0-1PGSTY~noble_amd64.deb
|
| u24.aarch64 | PIGSTY 4.0 u24.aarch64.pg19 : postgresql-19-column-encrypt postgresql-19-column-encrypt_4.0-1PGSTY~noble_arm64.deb
| PIGSTY 4.0 u24.aarch64.pg18 : postgresql-18-column-encrypt postgresql-18-column-encrypt_4.0-1PGSTY~noble_arm64.deb
| PIGSTY 4.0 u24.aarch64.pg17 : postgresql-17-column-encrypt postgresql-17-column-encrypt_4.0-1PGSTY~noble_arm64.deb
| PIGSTY 4.0 u24.aarch64.pg16 : postgresql-16-column-encrypt postgresql-16-column-encrypt_4.0-1PGSTY~noble_arm64.deb
| PIGSTY 4.0 u24.aarch64.pg15 : postgresql-15-column-encrypt postgresql-15-column-encrypt_4.0-1PGSTY~noble_arm64.deb
|
| u26.x86_64 | PIGSTY 4.0 u26.x86_64.pg19 : postgresql-19-column-encrypt postgresql-19-column-encrypt_4.0-1PGSTY~resolute_amd64.deb
| PIGSTY 4.0 u26.x86_64.pg18 : postgresql-18-column-encrypt postgresql-18-column-encrypt_4.0-1PGSTY~resolute_amd64.deb
| PIGSTY 4.0 u26.x86_64.pg17 : postgresql-17-column-encrypt postgresql-17-column-encrypt_4.0-1PGSTY~resolute_amd64.deb
| PIGSTY 4.0 u26.x86_64.pg16 : postgresql-16-column-encrypt postgresql-16-column-encrypt_4.0-1PGSTY~resolute_amd64.deb
| PIGSTY 4.0 u26.x86_64.pg15 : postgresql-15-column-encrypt postgresql-15-column-encrypt_4.0-1PGSTY~resolute_amd64.deb
|
| u26.aarch64 | PIGSTY 4.0 u26.aarch64.pg19 : postgresql-19-column-encrypt postgresql-19-column-encrypt_4.0-1PGSTY~resolute_arm64.deb
| PIGSTY 4.0 u26.aarch64.pg18 : postgresql-18-column-encrypt postgresql-18-column-encrypt_4.0-1PGSTY~resolute_arm64.deb
| PIGSTY 4.0 u26.aarch64.pg17 : postgresql-17-column-encrypt postgresql-17-column-encrypt_4.0-1PGSTY~resolute_arm64.deb
| PIGSTY 4.0 u26.aarch64.pg16 : postgresql-16-column-encrypt postgresql-16-column-encrypt_4.0-1PGSTY~resolute_arm64.deb
| PIGSTY 4.0 u26.aarch64.pg15 : postgresql-15-column-encrypt postgresql-15-column-encrypt_4.0-1PGSTY~resolute_arm64.deb
|
Build
You can build the RPM / DEB packages for column_encrypt using pig build:
Install
You can install column_encrypt directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Preload:
Create Extension:
Usage
Sources: README, v4.0 release, SQL objects
column_encrypt provides transparent column-level encryption for PostgreSQL. It defines encrypted_text and encrypted_bytea types, encrypts values through type input functions, decrypts through output functions, and manages data-encryption keys through the encrypt schema.
Enable
Load the shared library at server start, restart PostgreSQL, then create the schema and extension:
Add encrypt to search_path or schema-qualify the encrypted types and functions.
Register And Load Keys
The extension uses a two-tier key model with key-encryption keys and data-encryption keys. Ciphertext carries a key-version header so older values can still be decrypted after rotation.
Encrypt Columns
Without a loaded key, decrypting encrypted values raises an error.
Key Operations
Common functions include encrypt.activate_key, encrypt.revoke_key, encrypt.rotate, encrypt.verify, encrypt.unload_key, encrypt.loaded_cipher_key_versions, and encrypt.blind_index.
Use blind indexes for lookup patterns that cannot expose plaintext values directly:
Notes
The extension intentionally rejects binary send/receive for encrypted values. Equality and hash semantics are based on decrypted plaintext; range ordering is not supported. After upgrading from older ciphertext-hash behavior, rebuild hash indexes on encrypted columns.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)