pigsty icon indicating copy to clipboard operation
pigsty copied to clipboard

NEW PG extension: md5hash

Open sunxk opened this issue 1 year ago • 3 comments
trafficstars

Hi,

md5hash uses a 16-byte space to store the MD5 hash value. Compared to storing MD5 hash value as a string, this method offers better performance and requires less indexing and storage space. Could you consider adding this extension in future versions?

md5hash 1.0.1

Date: 2019-11-03 Status: Stable Abstract Efficient inline storage of 128-bit binary data (e.g. MD5 hashes). Description The usual way to store MD5 hashes is in varlena columns (e.g. TEXT), which occupies unnecessary amount of data (over 32B for 16B of data). This extension defines a native 16-byte data type, stored inline, allowing more efficient storage etc. which is especially useful for hashes used as identifiers.

code: https://github.com/tvondra/md5hash homepage: https://pgxn.org/dist/md5hash

sunxk avatar Apr 16 '24 08:04 sunxk

Looks like a good extension to be included

Vonng avatar Apr 16 '24 15:04 Vonng

Hi, @Vonng

[hashtypes] extension is another option; it contains three hash types and maybe it is more suitable to be included.

hashtypes 0.1.5 data types for sha{1,256,512}, md5 and crc32

homepage: https://pgxn.org/dist/hashtypes/ code: https://github.com/adjust/hashtypes

sunxk avatar May 01 '24 10:05 sunxk

Hi, @Vonng

[hashtypes] extension is another option; it contains three hash types and maybe it is more suitable to be included.

hashtypes 0.1.5 data types for sha{1,256,512}, md5 and crc32

homepage: https://pgxn.org/dist/hashtypes/ code: https://github.com/adjust/hashtypes

Codebase too old, compile error. Looks the md5hash works.

Vonng avatar May 04 '24 08:05 Vonng

resolved, will be added in the next release: https://github.com/Vonng/pigsty-rpm/commit/59ff5f717cab1b62ba8714989ff3deeeee718c07

Vonng avatar May 10 '24 02:05 Vonng