Re: JSON for PG 9.2
Peter Eisentraut <peter_e@gmx.net>
From: Peter Eisentraut <peter_e@gmx.net>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Jeff Janes <jeff.janes@gmail.com>, Pavel Stehule <pavel.stehule@gmail.com>, Joey Adams <joeyadams3.14159@gmail.com>, Robert Haas <robertmhaas@gmail.com>, "David E. Wheeler" <david@kineticode.com>, Claes Jakobsson <claes@surfar.nu>, Dimitri Fontaine <dimitri@2ndquadrant.fr>, Merlin Moncure <mmoncure@gmail.com>, Magnus Hagander <magnus@hagander.net>, Jan Urbański <wulczer@wulczer.org>, Simon Riggs <simon@2ndquadrant.com>, Bruce Momjian <bruce@momjian.us>, PostgreSQL-development Hackers <pgsql-hackers@postgresql.org>, Jan Wieck <janwieck@yahoo.com>
Date: 2012-01-23T20:20:03Z
Lists: pgsql-hackers
On sön, 2012-01-22 at 11:43 -0500, Andrew Dunstan wrote: > 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. We do check the correctness of surrogate pairs elsewhere. Search for "surrogate" in scan.l; should be easy to copy.