From:
Andrew Dunstan <andrew(at)dunslane(dot)net>
To:
Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc:
Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, 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-22 16:43:34
Message-ID:
4F1C3CB6.6090104@dunslane.net (view raw or flat )
Thread:
2011-12-05 20:12:35 from Bruce Momjian <bruce(at)momjian(dot)us>
2011-12-12 19:58:54 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-12 20:38:52 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-12-12 20:54:09 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-12 21:08:25 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-12-12 21:22:09 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-13 20:57:23 from Bruce Momjian <bruce(at)momjian(dot)us>
2011-12-12 21:23:44 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2011-12-12 21:34:02 from Josh Berkus <josh(at)agliodbs(dot)com>
2011-12-13 00:51:54 from Peter van Hardenberg <pvh(at)pvh(dot)ca>
2011-12-13 01:09:49 from "David E(dot) Wheeler" <david(at)justatheory(dot)com>
2011-12-13 07:03:33 from Jan Urbański <wulczer(at)wulczer(dot)org>
2011-12-13 01:36:02 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2011-12-13 01:46:41 from Daniel Farina <daniel(at)heroku(dot)com>
2011-12-13 03:08:28 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2011-12-13 01:37:13 from Daniel Farina <daniel(at)heroku(dot)com>
2011-12-13 03:42:24 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2011-12-13 18:05:57 from "David E(dot) Wheeler" <david(at)justatheory(dot)com>
2011-12-13 05:43:48 from Merlin Moncure <mmoncure(at)gmail(dot)com>
2011-12-13 05:25:59 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2011-12-13 08:06:22 from Peter van Hardenberg <pvh(at)pvh(dot)ca>
2011-12-13 20:27:03 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2011-12-13 13:44:54 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-13 13:59:05 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2011-12-13 14:11:52 from Greg Smith <greg(at)2ndQuadrant(dot)com>
2011-12-13 14:29:33 from Merlin Moncure <mmoncure(at)gmail(dot)com>
2011-12-13 14:44:24 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2011-12-13 20:33:28 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2011-12-13 20:36:04 from Merlin Moncure <mmoncure(at)gmail(dot)com>
2011-12-13 15:22:59 from Christopher Browne <cbbrowne(at)gmail(dot)com>
2011-12-13 20:41:12 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2011-12-13 21:13:59 from Merlin Moncure <mmoncure(at)gmail(dot)com>
2011-12-15 08:31:39 from Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
2011-12-16 22:39:51 from Daniel Farina <daniel(at)heroku(dot)com>
2011-12-16 23:44:46 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2011-12-17 22:02:49 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2011-12-18 00:06:02 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-18 11:13:35 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2011-12-12 21:26:00 from "David E(dot) Wheeler" <david(at)justatheory(dot)com>
2011-12-12 21:27:42 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2011-12-13 05:22:29 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-13 07:06:36 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-12-13 08:15:40 from Joey Adams <joeyadams3(dot)14159(at)gmail(dot)com>
2011-12-13 13:42:30 from Greg Smith <greg(at)2ndQuadrant(dot)com>
2011-12-15 18:34:20 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-12-15 21:47:30 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2011-12-16 13:52:45 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-16 13:57:16 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-12-16 17:13:56 from Joey Adams <joeyadams3(dot)14159(at)gmail(dot)com>
2011-12-17 02:26:31 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-17 11:53:45 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-12-18 00:50:11 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2011-12-18 03:21:03 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-18 03:40:26 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-18 03:42:09 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2011-12-18 03:46:03 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-18 09:49:27 from Jan Urbański <wulczer(at)wulczer(dot)org>
2011-12-18 09:54:51 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2012-01-15 00:49:31 from Mike Lewis <mikelikespie(at)gmail(dot)com>
2011-12-18 12:41:16 from Magnus Hagander <magnus(at)hagander(dot)net>
2011-12-18 17:17:45 from Merlin Moncure <mmoncure(at)gmail(dot)com>
2011-12-18 17:21:24 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2011-12-18 17:34:21 from Merlin Moncure <mmoncure(at)gmail(dot)com>
2011-12-18 18:26:38 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2011-12-19 04:41:54 from Merlin Moncure <mmoncure(at)gmail(dot)com>
2011-12-19 10:49:03 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2011-12-19 23:39:36 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2011-12-19 23:42:38 from "David E(dot) Wheeler" <david(at)justatheory(dot)com>
2011-12-20 18:23:43 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2011-12-20 18:26:33 from Andres Freund <andres(at)anarazel(dot)de>
2011-12-20 18:39:54 from Claes Jakobsson <claes(at)surfar(dot)nu>
2011-12-21 02:06:53 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2012-01-11 02:04:46 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-01-11 06:18:28 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2012-01-11 13:10:17 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-11 13:32:06 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2012-01-11 13:33:53 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-01-11 13:38:21 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2012-01-11 14:04:25 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-01-11 14:41:45 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2012-01-11 15:15:39 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-01-11 15:21:33 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2012-01-12 00:53:19 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-12 14:00:51 from Joey Adams <joeyadams3(dot)14159(at)gmail(dot)com>
2012-01-12 15:23:23 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-12 15:44:25 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2012-01-12 15:51:13 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-12 16:21:16 from Merlin Moncure <mmoncure(at)gmail(dot)com>
2012-01-12 16:25:39 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2012-01-12 16:28:10 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-14 20:06:27 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-14 20:31:54 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2012-01-14 23:11:57 from Joey Adams <joeyadams3(dot)14159(at)gmail(dot)com>
2012-01-15 00:13:52 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-15 16:08:05 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-22 04:40:30 from Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
2012-01-22 09:28:25 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-22 16:43:34 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-23 20:20:03 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2012-01-31 17:04:31 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-01-31 18:29:59 from Abhijit Menon-Sen <ams(at)toroid(dot)org>
2012-01-31 20:47:05 from Joey Adams <joeyadams3(dot)14159(at)gmail(dot)com>
2012-02-01 16:28:50 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-02-02 09:54:59 from Abhijit Menon-Sen <ams(at)toroid(dot)org>
2012-02-02 13:54:32 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-02-02 14:51:26 from Abhijit Menon-Sen <ams(at)toroid(dot)org>
2012-01-23 22:21:18 from Merlin Moncure <mmoncure(at)gmail(dot)com>
2012-01-23 22:32:24 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-23 22:33:21 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2012-01-27 04:17:05 from Abhijit Menon-Sen <ams(at)toroid(dot)org>
2012-01-30 14:54:13 from Abhijit Menon-Sen <ams(at)toroid(dot)org>
2012-01-30 15:37:06 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-31 14:35:03 from Merlin Moncure <mmoncure(at)gmail(dot)com>
2012-01-31 17:58:08 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-31 18:15:27 from Josh Berkus <josh(at)agliodbs(dot)com>
2012-01-31 18:32:31 from Merlin Moncure <mmoncure(at)gmail(dot)com>
2012-01-31 18:48:36 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-31 19:49:41 from Merlin Moncure <mmoncure(at)gmail(dot)com>
2012-01-31 20:15:42 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-02-01 05:46:55 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-02-01 15:49:30 from Merlin Moncure <mmoncure(at)gmail(dot)com>
2012-04-16 13:34:12 from Hannu Krosing <hannu(at)krosing(dot)net>
2012-04-16 14:10:33 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-04-16 14:40:41 from Merlin Moncure <mmoncure(at)gmail(dot)com>
2012-04-16 16:19:40 from Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
2012-04-16 16:41:30 from Merlin Moncure <mmoncure(at)gmail(dot)com>
2012-01-19 20:49:48 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-01-19 21:07:30 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-19 21:12:13 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-01-19 22:59:03 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-20 00:27:01 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-01-20 00:29:41 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2012-01-20 05:07:06 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-01-20 14:19:51 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-01-20 15:27:24 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-01-20 15:31:26 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-01-20 15:45:11 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-20 16:58:07 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-01-20 17:14:35 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2012-01-20 18:08:03 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-01-20 19:21:16 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-01-20 20:26:27 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-01-20 17:34:44 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-20 17:12:13 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2012-01-20 17:32:45 from Garick Hamlin <ghamlin(at)isc(dot)upenn(dot)edu>
2011-12-22 08:21:34 from Benedikt Grundmann <bgrundmann(at)janestreet(dot)com>
2011-12-20 20:52:04 from Christopher Browne <cbbrowne(at)gmail(dot)com>
2011-12-19 23:26:37 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2011-12-20 05:00:37 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-20 10:14:23 from Magnus Hagander <magnus(at)hagander(dot)net>
2011-12-21 02:04:29 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2011-12-20 10:13:27 from Magnus Hagander <magnus(at)hagander(dot)net>
2011-12-21 02:05:30 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Lists:
pgsql-hackers
On 01/22/2012 04:28 AM, Andrew Dunstan wrote:
>
>
> On 01/21/2012 11:40 PM, Jeff Janes wrote:
>> On Sun, Jan 15, 2012 at 8:08 AM, Andrew Dunstan<andrew(at)dunslane(dot)net>
>> wrote:
>>>
>>> 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
>>>> <https://bitbucket.org/adunstan/pgdevel >
>>>>
>>>>
>>>
>>> Here's an update that adds row_to_json, plus a bit more cleanup.
>> This is bit-rotted such that initdb fails
>>
>> creating template1 database in
>> /tmp/bar/src/test/regress/./tmp_check/data/base/1 ... FATAL: could
>> not create unique index "pg_proc_oid_index"
>> DETAIL: Key (oid)=(3145) is duplicated.
>>
>> I bumped up those oids in the patch, and it passes make check once I
>> figure out how to get the test run under UTF-8. Is it supposed to
>> pass under other encodings? I can't tell from the rest of thread
>> whether it supposed to pass in other encodings or not.
>>
>
> Yeah, regression tests generally are supposed to run in all encodings.
> Either we could knock out the offending test, or we could supply an
> alternative result file. If we do the latter, maybe we should modify
> the query slightly, so it reads
>
> SELECT 'getdatabaseencoding() = 'UTF8' as is_utf8, "\uaBcD"'::json;
>
>
Actually, given recent discussion I think that test should just be
removed from json.c. We don't actually have any test that the code point
is valid (e.g. that it doesn't refer to an unallocated code point). We
don't do that elsewhere either - the unicode_to_utf8() function the
scanner uses to turn \unnnn escapes into utf8 doesn't look for
unallocated code points. I'm not sure how much other validation we
should do - for example on correct use of surrogate pairs. I'd rather
get this as right as possible now - every time we tighten encoding rules
to make sure incorrectly encoded data doesn't get into the database it
causes someone real pain.
cheers
andrew
In response to
Responses
pgsql-hackers by date
Next :From: Jaime CasanovaDate: 2012-01-22 18:35:19
Subject : Re: pg_stat_database deadlock counter
Previous :From : Julien TachoiresDate : 2012-01-22 16:04:25
Subject : Re: patch : Allow toast tables to be moved to a different tablespace