Skip to content

iCyberon/pg_ulid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pg_ulid

Universally Unique Lexicographically Sortable Identifier (ULID) for PostgreSQL

Experimental PostgreSQL extension for generating ULIDs.

Install

You need to have go and compiler (clang/gcc) installed on your system.

$ git clone https://github.com/icyberon/pg_ulid
$ cd pg_ulid
$ make
$ sudo make install

This will build and install the extension.

CREATE EXTENSION pg_ulid;

Usage

Now you can start generating ULIDs from PostgreSQL by calling ulid. Function returns TEXT

SELECT ulid(); -- 01C1P15MBWYBWDG2WYRG08VCFR
SELECT pg_typeof(ulid()); -- text

Todo

  • Add binary support
  • Add tests

Credits

All credits go to ulid and plgo

About

Universally Unique Lexicographically Sortable Identifier (ULID) for PostgreSQL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published