From:
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To:
Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc:
Robert Haas <robertmhaas(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Joey Adams <joeyadams3(dot)14159(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-20 05:07:06
Message-ID:
21994.1327036026@sss.pgh.pa.us (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
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> On 01/19/2012 04:12 PM, Robert Haas wrote:
>> On Thu, Jan 19, 2012 at 4:07 PM, Andrew Dunstan<andrew(at)dunslane(dot)net> wrote:
>>> The spec only allows unescaped Unicode chars (and for our purposes that
>>> means UTF8). An unescaped non-ASCII character in, say, ISO-8859-1 will
>>> result in something that's not legal JSON.
>> I understand. I'm proposing that we not care. In other words, if the
>> server encoding is UTF-8, it'll really be JSON. But if the server
>> encoding is something else, it'll be almost-JSON.
> Of course, for data going to the client, if the client encoding is UTF8,
> they should get legal JSON, regardless of what the database encoding is,
> and conversely too, no?
Yes. I think this argument has been mostly theologizing, along the
lines of how many JSON characters can dance on the head of a pin.
>From a user's perspective, the database encoding is only a constraint on
which characters he can store. He does not know or care what the bit
representation is inside the server. As such, if we store a non-ASCII
character in a JSON string, it's valid JSON as far as the user is
concerned, so long as that character exists in the Unicode standard.
If his client encoding is UTF8, the value will be letter-perfect JSON
when it gets to him; and if his client encoding is not UTF8, then he's
already pretty much decided that he doesn't give a fig about the
Unicode-centricity of the JSON spec, no?
So I'm with Robert: we should just plain not care. I would further
suggest that maybe what we should do with incoming JSON escape sequences
is convert them to Unicode code points and then to the equivalent
character in the database encoding (or throw error if there is none).
regards, tom lane
In response to
Responses
pgsql-hackers by date
Next :From: Peter EisentrautDate: 2012-01-20 05:09:24
Subject : Re: Review of patch renaming constraints
Previous :From : Peter EisentrautDate : 2012-01-20 05:01:46
Subject : Re: pg_upgrade with plpython is broken