aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2013-06-08 09:12:48 -0400
committerAndrew Dunstan <andrew@dunslane.net>2013-06-08 09:12:48 -0400
commit94e3311b97448324d67ba9a527854271373329d9 (patch)
treef54ab210d201b70735affadcd018c00c8db737c4 /doc/src
parentc99d5d1bcc137c15058458bbdcdd2789b56e4c66 (diff)
downloadpostgresql-94e3311b97448324d67ba9a527854271373329d9.tar.gz
postgresql-94e3311b97448324d67ba9a527854271373329d9.zip
Handle Unicode surrogate pairs correctly when processing JSON.
In 9.2, Unicode escape sequences are not analysed at all other than to make sure that they are in the form \uXXXX. But in 9.3 many of the new operators and functions try to turn JSON text values into text in the server encoding, and this includes de-escaping Unicode escape sequences. This processing had not taken into account the possibility that this might contain a surrogate pair to designate a character outside the BMP. That is now handled correctly. This also enforces correct use of surrogate pairs, something that is not done by the type's input routines. This fact is noted in the docs.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/func.sgml9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 2c02fd1e1b4..3adb36579ea 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -10152,6 +10152,15 @@ table2-mapping
<note>
<para>
+ The <type>json</type> functions and operators can impose stricter validity requirements
+ than the type's input functions. In particular, they check much more closely that any use
+ of Unicode surrogate pairs to designate characters outside the Unicode Basic Multilingual
+ Plane is correct.
+ </para>
+ </note>
+
+ <note>
+ <para>
The <xref linkend="hstore"> extension has a cast from <type>hstore</type> to
<type>json</type>, so that converted <type>hstore</type> values are represented as JSON objects,
not as string values.