Re: JSON for PG 9.2

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Joey Adams <joeyadams3(dot)14159(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Claes Jakobsson <claes(at)surfar(dot)nu>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Jan Urbański <wulczer(at)wulczer(dot)org>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>, Jan Wieck <janwieck(at)yahoo(dot)com>
Subject: Re: JSON for PG 9.2
Date: 2012-01-15 16:08:05
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 01/14/2012 03:06 PM, Andrew Dunstan wrote:
> OK, here's a patch that does both query_to_json and array_to_json,
> along with docs and regression tests. It include Robert's original
> patch, although I can produce a differential patch if required. It can
> also be pulled from <>

Here's an update that adds row_to_json, plus a bit more cleanup. Example:

andrew=# SELECT row_to_json(q)
FROM (SELECT $$a$$ || x AS b,
y AS c,
ROW(y.*,ARRAY[4,5,6])] AS z
FROM generate_series(1,2) x,
generate_series(4,5) y) q;
(4 rows)

(This might be more to Robert's taste than query_to_json() :-) )



Attachment Content-Type Size
adjson3.patch text/x-patch 53.5 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-01-15 17:06:01 WAL Restore process during recovery
Previous Message Hitoshi Harada 2012-01-15 16:03:30 Re: Concurrent CREATE TABLE/DROP SCHEMA leaves inconsistent leftovers