Re: [BUGS] BUG #4822: xmlattributes encodes '&' twice

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUGS] BUG #4822: xmlattributes encodes '&' twice
Дата
Msg-id 28781.1243789244@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #4822: xmlattributes encodes '&' twice  (Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Ответы Re: [BUGS] BUG #4822: xmlattributes encodes '&' twice  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp> writes:
> Here is a patch to fix the bug. I added a parameter 'encode' to
> map_sql_value_to_xml_value() and pass false for xml attributes.

One thing I was wondering about, which is sort of highlighted by your
patch, is why is there the special exception for XML type in the
existing code, and how does that interact with this behavior? 
> !         /* ... exactly as-is for XML or encode is not required */
> !         if (type == XMLOID || !encode)
>               return str;

Seems like there could be cases where we're getting one too many or too
few encoding passes when the input is XML.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Feedback on writing extensible modules
Следующее
От: Andrew Dunstan
Дата:
Сообщение: check for missing tablespaces?