Search Postgresql Archives

Re: murmur3 hash binary data migration from Oracle to PostgreSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No we want to generate murmur3 format only. 

If you need a server-side murmur3 function 
-  one alternative is the https://github.com/markokr/pghashlib extension.

psql (15.2 (Debian 15.2-2))
Type "help" for help.

db=# create extension hashlib;
CREATE EXTENSION

db=# 
select hash_string('', 'murmur3');
select hash_string('a', 'murmur3');
select hash_string('abcdefg', 'murmur3');
select encode(hash128_string('abcdefg', 'murmur3'), 'hex');
+-------------+
| hash_string |
+-------------+
|           0 |
+-------------+
(1 row)

+-------------+
| hash_string |
+-------------+
|  1009084850 |
+-------------+
(1 row)

+-------------+
| hash_string |
+-------------+
| -2009294074 |
+-------------+
(1 row)

+----------------------------------+
|              encode              |
+----------------------------------+
| 069b3c88000000000000000000000000 |
+----------------------------------+
(1 row)



In my test, I have used this fork: https://github.com/bgdevlab/pghashlib/tree/bgdevlab/builds 

RUN   mkdir -p /pghashlib \
    && git clone  --depth 1 --branch bgdevlab/builds https://github.com/bgdevlab/pghashlib.git  /pghashlib \
    && cd /pghashlib \
    && make USE_PGXS=1 \
    && make USE_PGXS=1 install \
    && rm -rf /pghashlib

Regards,
 Imre


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux