Re: Proposal: Add JSON support

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Joseph Adams <joeyadams3(dot)14159(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal: Add JSON support
Date: 2010-04-06 17:04:41
Message-ID: l2y603c8f071004061004o60cb50ferfd1482b2d345bf8b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 6, 2010 at 11:05 AM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> Joseph Adams escribió:
>
>> http://constellationmedia.com/~funsite/static/json-0.0.2.tar.bz2
>>
>> My json.c is now 1161 lines long, so I can't quite call it "small" anymore.
>
> Just noticed you don't check the return value of malloc and friends.
> How do you intend to handle that?  There are various places that would
> simply dump core with the 0.0.2 code.  Within Postgres it's easy -- a
> failed palloc aborts the transaction and doesn't continue running your
> code.  But in a standalone library that's probably not acceptable.
>
> If we were to import this there are some lines that could be ripped out,
> like 60 lines in the string buffer stuff and 130 lines for Unicode.
> That brings your code just under 1000 lines.

Let me be the first to suggest putting this code under the PostgreSQL license.

...Robert

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-04-06 17:17:27 Re: SELECT constant; takes 15x longer on 9.0?
Previous Message David E. Wheeler 2010-04-06 17:00:30 Re: SELECT constant; takes 15x longer on 9.0?