You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Howdy thanks for creating this really useful function! To use this more easily, I ended up adding a new domain type for the text result of this function so it can be used more like the uuid type that its replacing. The one extra SQL statement I added:
this add a few standard checks for string length and sets the max value (per the ULID spec) to prevent invalid IDs from sneaking in. It also allows you to use the new ulid type in table creation statements in a clean way:
CREATETABLEexample_table
(
id ulid primary key,
...other columns
);
Was gonna open a PR but since it is such a small change thought this might be easier to add to the discussion here.
The text was updated successfully, but these errors were encountered:
@Trupal00p Thanks, that's helpful! Maybe you could make a pull request to add a note about this to the README? I don't think we should require every user of the generate_ulid() function to also import this new type.
Your ulid_upper_bound check may also run into problems if a user chooses to pass a custom prefix to the generate function.
Howdy thanks for creating this really useful function! To use this more easily, I ended up adding a new domain type for the text result of this function so it can be used more like the uuid type that its replacing. The one extra SQL statement I added:
this add a few standard checks for string length and sets the max value (per the ULID spec) to prevent invalid IDs from sneaking in. It also allows you to use the new ulid type in table creation statements in a clean way:
Was gonna open a PR but since it is such a small change thought this might be easier to add to the discussion here.
The text was updated successfully, but these errors were encountered: