Is there any function / stored procedure in PostgreSQL / plpgsql that is similar to encodeURI javascripts?
What does it mean? Javascript has a convenient built-in function to encode any type of URL:
encodeURI (url) -> returns the encoded URL
For example:
encodeURI('http://hu.wikipedia.org/wiki/SΓ£o_Paulo')β returns a string that"http://hu.wikipedia.org/wiki/S%C3%A3o_Paulo"
I am looking for exactly the same.
I do not want to encode each parameter separately. I don't need the javascript function encodeURIComponent, which is not the same. In the above example, we get another conclusion with
encodeURIComponent('http://hu.wikipedia.org/wiki/SΓ£o_Paulo')
-> "http%3A%2F%2Fhu.wikipedia.org%2Fwiki%2FS%C3%A3o_Paulo"
It encodes the entire string, not just part of the path. So this is not what I am looking for. I need a plpgsql function that gives the equivalent output of the javascript encodeURI function.
Thank!