hashtypes
sha1, md5 and other data types for PostgreSQL
Repository
adjust/hashtypes
https://github.com/adjust/hashtypes/
Source
hashtypes-0.1.5.tar.gz
hashtypes-0.1.5.tar.gz
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
hashtypes | 0.1.5 | TYPE | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 3750 | hashtypes | No | Yes | No | Yes | No | No | - |
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.1.5 | 1817161514 | hashtypes | - |
| RPM | PIGSTY | 0.1.5 | 1817161514 | hashtypes_$v | - |
| DEB | PIGSTY | 0.1.5 | 1817161514 | postgresql-$v-hashtypes | - |
Build
You can build the RPM / DEB packages for hashtypes using pig build:
Install
You can install hashtypes directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Install
pig
dnf
apt
Create Extension:
Usage
The hashtypes extension provides native data types for storing hash values and checksums in their binary representation, saving storage compared to text.
Data Types
| Type | Storage | Description |
|---|---|---|
sha1 | 20 bytes | SHA-1 hash (160-bit) |
sha224 | 28 bytes | SHA-224 hash (224-bit) |
sha256 | 32 bytes | SHA-256 hash (256-bit) |
sha384 | 48 bytes | SHA-384 hash (384-bit) |
sha512 | 64 bytes | SHA-512 hash (512-bit) |
crc32 | 4 bytes | CRC-32 checksum |
Usage
Operators
All types support comparison operators: =, <>, <, >, <=, >=.
Index Support
Btree and hash index operator classes are provided for all types.
Casts
All types support bidirectional casts to/from text and bytea.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)