joeyadams3.14...@gmail.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.

Interesting...

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...
    http://code.nytimes.com/projects/dbslayer

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."

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to