URL-encoding VARCHAR and TEXT values in PostgreSQL -


are there well-known pl functions/libraries extending postgresql (9.4.1) database url encoding (also known percent encoding) capabilities?

here's example of intended functionality:

  • input string: international donor day: give blood cause!
  • output string: international%20donor%20day%3a%20give%20blood%20for%20a%20good%20cause%21

i guess alternative roll out own implementation, since afaik there no built-in way of doing this.

this trivial in external pl,e.g.

create language plpythonu;  create or replace function urlescape(original text) returns text language plpythonu $$ import urllib return urllib.quote(original); $$ immutable strict; 

Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -