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  (Bruce Momjian <bruce@momjian.us>)
Re: PATCH: Add uri percent-encoding for binary data  (Isaac Morland <isaac.morland@gmail.com>)
Re: PATCH: Add uri percent-encoding for binary data  (Arthur Zakirov <zaartur@gmail.com>)
Re: PATCH: Add uri percent-encoding for binary data  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список 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 по дате отправления:

Предыдущее
От: Ashutosh Sharma
Дата:
Сообщение: Re: Change atoi to strtol in same place
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: refactoring - share str2*int64 functions