Skip site navigation (1) Skip section navigation (2)

Re: Proposal: Add JSON support

From: Chris Browne <cbbrowne(at)acm(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal: Add JSON support
Date: 2010-03-30 21:38:54
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
joeyadams3(dot)14159(at)gmail(dot)com (Joseph Adams) writes:
> I introduced myself in the thread "Proposal: access control jails (and
> introduction as aspiring GSoC student)", and we discussed jails and
> session-local variables.  But, as Robert Haas suggested, implementing
> variable support in the backend would probably be way too ambitious a
> project for a newbie like me.  I decided instead to pursue the task of
> adding JSON support to PostgreSQL, hence the new thread.


I had a discussion about much this sort of thing with a local LUG
associate; he was interested in this from a "doing CouchDB-ish things
using PostgreSQL" perspective.

There were a couple perspectives there, which may be somewhat orthogonal
to what you're trying to do.  I'll mention them as they may suggest
useful operations.

1.  Buddy Myles pointed out a NYTimes project which does something
pretty analagous...

This is a proxy that allows clients to submit requests via HTTP,
returning responses in JSON form.  Note that the HTTP request has the
SQL query embedded into it.

2.  CouchDB's interface is much the same, where clients submit HTTP
requests and receive JSON responses back, but with the difference that
the query is a stylized sorta-JSON form.

I'd think that you could get quite a long ways on this, at least doing
something like dbslayer without *necessarily* needing to do terribly
much work inside the DB engine.

Mapping a tuple, or a list of tuples, into a forest of JSON documents
should be pretty straightforward; whether or not it's really desirable
to operate a JSON-flavoured query inside PostgreSQL may be the
difference between *this year's* GSOC and *next year's* :-).
"...the  Jedi learned  early   on  what  language   the universe   was
programmed in. Then they took advantage of  an accident of language to
obscure this  fact from the  unwashed.  They all affected  an inverted
lisp. so, a Jedi to be, you the Forth must use."

In response to


pgsql-hackers by date

Next:From: Robert HaasDate: 2010-03-30 22:01:28
Subject: Re: Alpha release this week?
Previous:From: Josh BerkusDate: 2010-03-30 20:43:21
Subject: Re: Alpha release this week?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group