Re: JSON and unicode surrogate pairs

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: JSON and unicode surrogate pairs
Date: 2013-06-12 11:31:15
Message-ID: 51B85C03.1060300@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 06/12/2013 12:13 AM, Craig Ringer wrote:
> On 06/12/2013 08:42 AM, Andrew Dunstan wrote:
>> If we work by analogy to Postgres' own handling of Unicode escapes,
>> we'll raise an error on any Unicode escape beyond ASCII (not on input
>> for legacy reasons, but on trying to process such datums). I gather that
>> would meet your objection.
> I could live with that if eager validation on input was the default, but
> could be disabled by setting (say) compat_lazy_json_validation = on .
> I don't like the idea of leaving us saddled with weak validation just
> that's what we've got. It's been an ongoing source of pain as UTF-8
> support has improved and I'd really like a way to avoid semi-valid JSON
> making it into the DB and causing similar problems.
>

I think it's rather too late in the cycle to be proposing new GUCs. We
can revisit this for 9.4 perhaps.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2013-06-12 11:38:37 Re: Clean switchover
Previous Message Greg Stark 2013-06-12 09:55:54 Re: Adding IEEE 754:2008 decimal floating point and hardware support for it