Re: jsonb, unicode escapes and escaped backslashes

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: jsonb, unicode escapes and escaped backslashes
Дата
Msg-id 54CABBEA.7070903@dunslane.net
обсуждение исходный текст
Ответ на Re: jsonb, unicode escapes and escaped backslashes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 01/29/2015 05:39 PM, Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> I have yet to understand what we fix by banning \u0000.  How is 0000
>> different from any other four-digit hexadecimal number that's not a
>> valid character in the current encoding?  What does banning that one
>> particular value do?
> BTW, as to the point about encoding violations: we *already* ban \uXXXX
> sequences that don't correspond to valid characters in the current
> encoding.  The attempt to exclude U+0000 from the set of banned characters
> was ill-advised, plain and simple.
>
>             

Actually, unless the encoding is utf8 we ban all non-ascii unicode 
escapes even if they might designate a valid character in the current 
encoding. This was arrived at after some discussion here. So adding 
\u0000 to the list of banned characters is arguably just making us more 
consistent.


cheers

andrew



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: jsonb, unicode escapes and escaped backslashes
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: Proposal: two new role attributes and/or capabilities?