CREATE EXTENSION url_encode; CREATE EXTENSION postgres=# SELECT url_encode('Ahoj Světe'), url_encode('Hello World'); url_encode │ url_encode ...
However, sometimes, in the params, it is another URL which is encoded. It would have been great to have macros directly included inside the package to encode/decode the URLs.