Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON

Поиск
Список
Период
Сортировка
От Florian Pflug
Тема Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON
Дата
Msg-id 83AB8CA7-1822-41FE-BF56-D3D6A88BB88A@phlo.org
обсуждение исходный текст
Ответ на Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON  (Joey Adams <joeyadams3.14159@gmail.com>)
Список pgsql-hackers
On Jul23, 2011, at 00:04 , Joey Adams wrote:
> I think I've decided to only allow escapes of non-ASCII characters
> when the database encoding is UTF8.  For example, $$"\u2013"$$::json
> will fail if the database encoding is WIN1252, even though WIN1252 can
> encode U+2013 (EN DASH).  This may be somewhat draconian, given that:
>
> * SQL_ASCII can otherwise handle "any" language according to the documentation.

+1. It makes the handling if \uXXXX sequences consistent with the behaviour
of CHR(), which seems like a Good Thing. Clients can also work around this
restriction be de-escaping themselves, which shouldn't be too hard.

> * The XML type doesn't have this restriction (it just stores the
> input text verbatim, and converts it to UTF-8 before doing anything
> complicated with it).

Yeah. But the price the XML type pays for that is the lack of an
equality operator.

best regards,
Florian Pflug




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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: pgbench --unlogged-tables
Следующее
От: Christopher Browne
Дата:
Сообщение: Re: Policy on pulling in code from other projects?