Re: JSON for PG 9.2

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Peter van Hardenberg <pvh(at)pvh(dot)ca>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org, Joseph Adams <joeyadams3(dot)14159(at)gmail(dot)com>
Subject: Re: JSON for PG 9.2
Date: 2011-12-13 21:13:59
Message-ID: CAHyXU0wedZ7GEDzHb+FV8x73Ur0dGh14R2dfpCWkwRn=X9BoiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 13, 2011 at 2:41 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On tis, 2011-12-13 at 08:44 -0500, Robert Haas wrote:
>> Just because all our languages are Turing-complete doesn't mean they
>> are all equally well-suited to every task.  Of course, that doesn't
>> mean we'd add a whole new language just to get a JSON parser, but I
>> don't think that's really what Peter was saying.
>
> That was in fact what I was saying.
>
>> Rather, I think the
>> point is that embedded Javascript is *extremely* popular, lots and
>> lots of people are supporting it, and we ought to seriously consider
>> doing the same.  It's hard to think of another PL that we could add
>> that would give us anywhere near the bang for the buck that Javascript
>> would.
>
> If JavaScript (trademark of Oracle, btw.; be careful about calling
> anything PL/JavaScript) had a near-canonical implementation with a
> stable shared library and a C API, then this might be a no-brainer.  But
> instead we have lots of implementations, and the one being favored here
> is written in C++ and changes the soname every 3 months.  I don't think
> that's the sort of thing we want to carry around.

Mozilla SpiderMonkey seems like a good fit: it compiles to a
dependency free .so, has excellent platform support, has a stable C
API, and while it's C++ internally makes no use of exceptions (in
fact, it turns them off in the c++ compiler). ISTM to be a suitable
foundation for an external module, 'in core' parser, pl, or anything
really.

merlin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Glaesemann 2011-12-13 21:22:09 Re: logging in high performance systems.
Previous Message Alexander Korotkov 2011-12-13 21:11:17 Re: GiST for range types (was Re: Range Types - typo + NULL string constructor)