Re: JSON for PG 9.2

From: Jan Urbański <wulczer(at)wulczer(dot)org>
To: "David E(dot) Wheeler" <david(at)justatheory(dot)com>, Peter van Hardenberg <pvh(at)pvh(dot)ca>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Joseph Adams <joeyadams3(dot)14159(at)gmail(dot)com>, Claes Jakobsson <claes(at)gluefinance(dot)com>
Subject: Re: JSON for PG 9.2
Date: 2011-12-13 07:03:33
Message-ID: 1323759813.6139.2.camel@Nokia-N900-42-11
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

----- Original message -----
> On Dec 12, 2011, at 4:51 PM, Peter van Hardenberg wrote:
>
> > Because we haven't heard from him in a while we've been using PL/V8 to
> > validate a JSON datatype simulated by a DOMAIN with a simple
> > acceptance function. (See below.) This is not ideally performant but
> > thanks to V8's JIT the JSON parser is actually reasonably good.
>
> Note that Claes Jakobsson has been working on a JSON data type using the
> Jansson JSON library.
>
>    http://pgxn.org/dist/pg-json/

We recently needed to store/valisate JSON data and be able to do some trivial extraction of values from it and went with pg-json.

The great benefit of having JSON as an extension type is being able to use an external library (Jansson is very small, MIT licensed, looks really well written and has been actively maintaied for years) and not being tied to a yearly release cycle.

Postgres jumps through a lot of hoops to be extensible and I think a JSON type is a kind of thing that fits the bill of an extension perfectly.

Cheers,
Jan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2011-12-13 07:06:36 Re: JSON for PG 9.2
Previous Message Tom Lane 2011-12-13 05:46:37 Re: pgsql_fdw, FDW for PostgreSQL server