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

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Joseph Adams <joeyadams3(dot)14159(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)
Date: 2010-09-18 03:12:41
Message-ID: AANLkTindmwEcM=e-beqOnNi5wJ_KmP9nQ4vynx=ZsWqj@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Sep 18, 2010 at 11:46 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> <itagaki(dot)takahiro(at)gmail(dot)com> wrote:
>> One of my proposal is we don't have to keep the original input text.
>> We store JSON data in effective internal formats. If users want to get
>> human-readable output, they can use stringify() with indentation option.
>
> There's a trade-off here: this will make some things faster, but other
> things slower.  Probably some discussion of the pros and cons is in
> order.

I didn't intended to introduce non-text internal formats. The original
patch spent some codes to keep all of whitespaces as-is in the input.
But I'd say we can simplify it.

Except whitespaces, normalization of strings and numbers might be
problem when we support JSON comparison operators -- comparison of
Unicode escaped characters in strings or 0 vs. 0.0 in numbers.

--
Itagaki Takahiro

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-09-18 03:21:13 Re: bg worker: general purpose requirements
Previous Message Robert Haas 2010-09-18 02:46:38 Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)