I saw there's a vote for postgres extensions discu...
# sql
i
I saw there's a vote for postgres extensions discussion on Github that includes pg_hashids. Does anyone know if it would be possible to implement something like that using the Functions/Triggers that are currently in alpha? I'd love to set some short hash ids to use in URLs for some of my content. https://github.com/supabase/supabase/discussions/679?sort=top#discussioncomment-761401
c
That discussion includes a suggestion to use supascript (which is basically PLV8 with a few goodies attached to it, so if you want to user vanilla PLV8 instead of supascript, you just need to copy-paste the JS code from the hashids.js library inside your function implementation) in a function in order to achieve that - is that NOT an option for you?
I am not part of the team, so you should take what I say with a grain of salt but my understanding is that: - regular PostgreSQL functions and triggers are NOT in alpha - they are standard PostgreSQL features which are production ready and you can definitely use them even today; - the alpha moniker is related to (a) the functions/triggers editor in the Supabase dashboard and (b) the webhook functionality associated with functions/triggers
i
Gotcha, I'll look into this some more! I'm relatively new to postgres stuff and am using supabase to focus a bit more on the front-end for this side project. now that im re-reading that post I think you're right and this is a solution that will work - i'll just have to dig in a bit more and learn about some of this before I try copy+pasting stuff into supabase 😂 Thanks for clarifying this!
c
no problem, feel free to continue the thread if you need more help