Giter Club home page Giter Club logo

pg_xxhash's Introduction

pg_xxhash

PostgreSQL ❤️ xxhash

Tested with xxhash 0.8.1 and PostgreSQL 14.1 on Linux and macOS.

Think twice before even considering to use it in any serious environment.

Issues are discouraged, pull requests are greatly appreciated.

TODO

  • tests
  • seed/secret support

Build

Make sure you've got the PostgreSQL source code somewhere.
For Ubuntu/pgdg and PostgreSQL 14: apt install postgresql-server-dev-14

$ make
$ make install

Enable the extension:

=# CREATE EXTENSION xxhash;

Usage

=# SELECT url, xxh32(url), xxh64(url), xxh3_64(url), xxh128(url) FROM (SELECT 'https://example.com' AS url) x;
┌─[ RECORD 1 ]───────────────────────────────┐
│ url     │ https://example.com              │
│ xxh32   │ ba15a4a8                         │
│ xxh64   │ b131752760b48654                 │
│ xxh3_64 │ 9398cc7c078760e6                 │
│ xxh128  │ 4879d6aa9d88e9c7a169c008892d4829 │
└─────────┴──────────────────────────────────┘


=# SELECT url, xxh32b(url), xxh64b(url), xxh3_64b(url), xxh128b(url) FROM (SELECT 'https://example.com' AS url) x;
┌─[ RECORD 1 ]──────────────────────────────────┐
│ url      │ https://example.com                │
│ xxh32b   │ \xba15a4a8                         │
│ xxh64b   │ \xb131752760b48654                 │
│ xxh3_64b │ \x9398cc7c078760e6                 │
│ xxh128b  │ \x4879d6aa9d88e9c7a169c008892d4829 │
└──────────┴────────────────────────────────────┘

pg_xxhash's People

Contributors

hatarist avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.