Is there a function in PostgreSQL that can convert a base 10 number like 30 into a base 36 representation like u?
Is there a function in PostgreSQL that can convert a base 10 number like
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are base-64 functions (such as
encode) but nothing for base-36. But you could write one of your own or use this one:I think you should ask yourself if the database is the right place for dealing with this sort of data formatting though, presentational issues like this might be better handled closer to final viewing level of your stack.