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

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)
Date: 2010-09-19 09:11:23
Message-ID: 4C95D3BB.5070302@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 08/12/2010 06:27 AM, David Fetter wrote:

> +1 for putting it in core in 9.1 :)

There are times I really wish I could get object graphs, or at least
hierarchically nested object trees, of objects matching various
criteria. JSON might be a reasonable representation, and one that's
increasingly well supported by many different clients. Having it core
would be really handy for that sort of use, especially as managing
contrib modules is rather far from ideal in Pg as things stand.

Using the usual generic business app example, it'd be good to be able to
retrieve "customer 1234, as well as all dependent records in Invoices
and Addresses" with one query, one round trip ... and no horrid ORM-like
use of left outer joins plus post-processing.

I've been able to do that with nested XML representations, but it's a
remarkably verbose, bulky way to move chunks of data around.

This patch already looks like it has lots of promise for that sort of
use. It'd need aggregates, but that's already come up. A
composite-or-row-type to json converter seems to be much of the point of
this patch, and that's the only other part that's really required. So
I'm excited, and I suspect I won't be the only one.

I'm grabbing it to start playing with it now. I just wanted to chime in
with interest + enthusiasm for JSON as an increasingly useful
representation.

--
Craig Ringer

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message saera87 2010-09-19 09:41:29 BUG #5662: Incomplete view
Previous Message Tom Lane 2010-09-19 04:17:22 Re: Postgres 9.0.0 release scheduled