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

Поиск
Список
Период
Сортировка
От Joey Adams
Тема Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON
Дата
Msg-id CAARyMpBmM8GvDVsY1MkS6hhs+N-KwhycrAypmtKnUCxUo-ETOA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON  (Florian Pflug <fgp@phlo.org>)
Ответы Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON
Список pgsql-hackers
On Sun, Jul 24, 2011 at 2:19 PM, Florian Pflug <fgp@phlo.org> wrote:
> The downside being that we'd then either need to canonicalize in
> the equality operator, or live with either no equality operator or
> a rather strange one.

It just occurred to me that, even if we sort object members, texteq
might not be a sufficient way to determine equality.  In particular,
IEEE floats treat +0 and -0 as two different things, but they are
equal when compared.  Note that we're only dealing with a decimal
representation; we're not (currently) converting to double-precision
representation and back.

Should we mimic IEEE floats and preserve -0 versus +0 while treating
them as equal?  Or should we treat JSON floats like numeric and
convert -0 to 0 on input?  Or should we do something else?  I think
converting -0 to 0 would be a bad idea, as it would violate the
intuitive assumption that JSON can be used to marshal double-precision
floats.

- Joey


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

Предыдущее
От: Harshitha S
Дата:
Сообщение: Re: Tracing in Postgres
Следующее
От: Joey Adams
Дата:
Сообщение: Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON