Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Florian Weimer <fw(at)deneb(dot)enyo(dot)de>
Cc: Terry Laurenzo <tj(at)laurenzo(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)
Date: 2010-10-20 17:26:12
Message-ID: 4CBF2634.80107@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/20/2010 01:15 PM, Florian Weimer wrote:
> * Terry Laurenzo:
>
>> Agreed. BSON was born out of implementations that either lacked
>> arbitrary precision numbers or had a strong affinity to an
>> int/floating point way of thinking about numbers. I believe that if
>> BSON had an arbitrary precision number type, it would be a proper
>> superset of JSON.
> But JSON has only double-precision numbers!?

AFAICT the JSON spec says nothing at all about the precision of numbers.
It just provides a syntax for them. We should not confuse what can be
allowed in JSON with what can be handled by some consumers of JSON such
as ECMAScript.

However, since we would quite reasonably require that any JSON
implementation be able to handle arbitrary precision numbers, that
apparently rules out BSON as a storage engine for it, since BSON can not
handle such things.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Aidan Van Dyk 2010-10-20 17:34:59 Re: pg_rawdump
Previous Message Florian Weimer 2010-10-20 17:15:59 Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)