PATCH: Add uri percent-encoding for binary data
От | Anders Åstrand |
---|---|
Тема | PATCH: Add uri percent-encoding for binary data |
Дата | |
Msg-id | CAPwPebtwJnjjt=eUUsmL1zZ6w3jVnA1cVjEzhBoucCYTJc9D2w@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: PATCH: Add uri percent-encoding for binary data
Re: PATCH: Add uri percent-encoding for binary data Re: PATCH: Add uri percent-encoding for binary data Re: PATCH: Add uri percent-encoding for binary data |
Список | pgsql-hackers |
Hello Attached is a patch for adding uri as an encoding option for encode/decode. It uses what's called "percent-encoding" in rfc3986 (https://tools.ietf.org/html/rfc3986#section-2.1). The background for this patch is that I could easily build urls in plpgsql, but doing the actual encoding of the url parts is painfully slow. The list of available encodings for encode/decode looks quite arbitrary to me, so I can't see any reason this one couldn't be in there. In modern web scenarios one would probably most likely want to encode the utf8 representation of a text string for inclusion in a url, in which case correct invocation would be ENCODE(CONVERT_TO('some text in database encoding goes here', 'UTF8'), 'uri'), but uri percent-encoding can of course also be used for other text encodings and arbitrary binary data. Regards, Anders
Вложения
В списке pgsql-hackers по дате отправления: