From:
Andrew Dunstan <andrew(at)dunslane(dot)net>
To:
Robert Haas <robertmhaas(at)gmail(dot)com>
Cc:
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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 17:34:44
Message-ID:
4F19A5B4.2020902@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/20/2012 11:58 AM, Robert Haas wrote:
> On Fri, Jan 20, 2012 at 10:45 AM, Andrew Dunstan<andrew(at)dunslane(dot)net> wrote:
>> XML's&#nnnn; escape mechanism is more or less the equivalent of JSON's
>> \unnnn. But XML documents can be encoded in a variety of encodings,
>> including non-unicode encodings such as Latin-1. However, no matter what the
>> document encoding,&#nnnn; designates the character with Unicode code point
>> nnnn, whether or not that is part of the document encoding's charset.
> OK.
>
>> Given that precedent, I'm wondering if we do need to enforce anything other
>> than that it is a valid unicode code point.
>>
>> Equivalence comparison is going to be difficult anyway if you're not
>> resolving all \unnnn escapes. Possibly we need some sort of canonicalization
>> function to apply for comparison purposes. But we're not providing any
>> comparison ops today anyway, so I don't think we need to make that decision
>> now. As you say, there doesn't seem to be any defined canonical form - the
>> spec is a bit light on in this respect.
> Well, we clearly have to resolve all \uXXXX to do either comparison or
> canonicalization. The current patch does neither, but presumably we
> want to leave the door open to such things. If we're using UTF-8 and
> comparing two strings, and we get to a position where one of them has
> a character and the other has \uXXXX, it's pretty simple to do the
> comparison: we just turn XXXX into a wchar_t and test for equality.
> That should be trivial, unless I'm misunderstanding. If, however,
> we're not using UTF-8, we have to first turn \uXXXX into a Unicode
> code point, then covert that to a character in the database encoding,
> and then test for equality with the other character after that. I'm
> not sure whether that's possible in general, how to do it, or how
> efficient it is. Can you or anyone shed any light on that topic?
We know perfectly well how to turn two strings from encoding x to utf8
(see mb_utils.c::pg_do_encoding_conversion() ). Once we've done that
ISTM we have reduced this to the previous problem, as the mathematicians
like to say.
cheers
andrew
In response to
pgsql-hackers by date
Next :From: Greg SmithDate: 2012-01-20 17:35:38
Subject : Re: Vacuum rate limit in KBps
Previous :From : Garick HamlinDate : 2012-01-20 17:32:45
Subject : Re: JSON for PG 9.2