Code Monkey home page Code Monkey logo

pg-ulid's People

Contributors

djbusby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pg-ulid's Issues

Inconsistent readme

Creates a ULID datatype as a 128bit integer, which we hope operates faster than text.

When in pg_ulid--0.0.4.sql

CREATE FUNCTION ulid_create()
 RETURNS text
 LANGUAGE C
 VOLATILE STRICT
 AS '$libdir/pg_ulid';

function ulid_create(timestamp with time zone) does not exist

Hello,

Following the readme, execution of ulid_create with a timestamp returns the following error:

SELECT ulid_create(now() - '37 days'::interval);

ERROR:  function ulid_create(timestamp with time zone) does not exist
LINE 1: SELECT ulid_create(now() - '37 days'::interval);
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
SQL state: 42883
Character: 8

update readme with benchmarks

Hello,

In case you would like to update the README with some benchmarks, I compared them as follows.

--
-- AMD Ryzen 3400G, PG13, WSL Ubuntu 20.04
--

-- Generation

-- uuid-ossp 
-- "Execution Time: 2712.880 ms"
explain analyze SELECT uuid_generate_v4()
FROM generate_series(1, 499000) t(i);

-- "Execution Time: 5083.430 ms"
explain analyze SELECT ulid_create()
FROM generate_series(1, 499000) t(i);


-- "Execution Time: 5927.542 ms"
explain analyze SELECT generate_ulid()
FROM generate_series(1, 499000) t(i);

-- Inserts

-- INSERT 0 499000 uuid_generate_v4()
-- Query returned successfully in 6 secs 748 msec.

-- INSERT 0 499000  ulid_create()
-- Query returned successfully in 8 secs 529 msec.

-- INSERT 0 499000 generate_ulid()
-- Query returned successfully in 12 secs 99 msec.

Install error

Linux version 5.10.76-linuxkit (root@buildkitsandbox) (gcc (Alpine 10.2.1_pre1) 10.2.1 20201203, GNU ld (GNU Binutils) 2.35.2) #1 SMP Mon Nov 8 10:21:19 UTC 2021

root@0046bd9d2463:/usr/src/ulid-c# git clone https://github.com/skeeto/ulid-c.git
Cloning into 'ulid-c'...
remote: Enumerating objects: 116, done.
remote: Total 116 (delta 0), reused 0 (delta 0), pack-reused 116
Receiving objects: 100% (116/116), 22.24 KiB | 437.00 KiB/s, done.
Resolving deltas: 100% (68/68), done.


root@0046bd9d2463:/usr/src# apt install build-essential postgresql-server-dev-14
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
.....


root@0046bd9d2463:/usr/src/ulid-c# make install-strip
make: *** No rule to make target 'install-strip'.  Stop.

I'm sorry, but it's unclear how to build and install the extension

ulid data type not found postgresql-13

Hello,

Thank you for the extension.
build.txt
I followed the instruction to build the extension, but while creating the test table, I get this error

ERROR:  type "ulid" does not exist
LINE 2:  id ulid not null default ulid_create(),

SELECT ulid_create(); works fine, and returns the ulid.

Attached is the build log.

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.