typeid-sql
typeid-sql copied to clipboard
SQL implementation TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs
When adding the equality operator in a supabase migration: ``` CREATE OR REPLACE FUNCTION compare_type_id_equality(lhs_id typeid, rhs_id VARCHAR) RETURNS BOOLEAN AS $$ SELECT lhs_id = typeid_parse(rhs_id); $$ LANGUAGE SQL IMMUTABLE;...
Thank you for this! I was just curious whether I should just go with having the primary key as text or use the scripts to have a type_id in SQL?...
Has anyone managed to get typeid-sql working with rails/activerecord/postgres? Despite hours and hours of trying, I cannot get past this error: ``` PG::UndefinedFunction: ERROR: operator is only a shell: character...
Looks like the spec allows for underscores in the prefix, however the `typeid_parse` function only splits on the first `_`
Hello, It seems like 0.3 has been supported for quite some time, but sql package has not been updated to support that spec. The ask here is if this is...
FYI, I ran https://github.com/okbob/plpgsql_check against my DB after running the sample Postgres implementation, and I think it's complaining that these two text expressions should be cast to `bytea`: https://github.com/jetify-com/typeid-sql/blob/728d1fd2c9f3761ebdba588e7f08894b0b6dee11/sql/02_base32.sql#L9 https://github.com/jetify-com/typeid-sql/blob/728d1fd2c9f3761ebdba588e7f08894b0b6dee11/sql/02_base32.sql#L81...