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
Post a Comment