Re: chr() is still too loose about UTF8 code points

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: chr() is still too loose about UTF8 code points
Date: 2014-05-16 18:07:47
Message-ID: 1400263667706-5804270.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane-2 wrote
> Noah Misch &lt;

> noah@

> &gt; writes:
>> On Fri, May 16, 2014 at 11:05:08AM -0400, Tom Lane wrote:
>>> I think this probably means we need to change chr() to reject code
>>> points
>>> above 10ffff. Should we back-patch that, or just do it in HEAD?
>
>> The compatibility risks resemble those associated with the fixes for bug
>> #9210, so I recommend HEAD only:
>
>> http://www.postgresql.org/message-id/flat/

> 20140220043940(dot)GA3064539(at)(dot)leadboat

>
> While I'd be willing to ignore that risk so far as code points above
> 10ffff go, if we want pg_utf8_islegal to be happy then we will also
> have to reject surrogate-pair code points. It's not beyond the realm
> of possibility that somebody is intentionally generating such code
> points with chr(), despite the dump/reload hazard. So now I agree
> that this is sounding more like a major-version-only behavioral change.

I would tend to agree on principle - though since this does fall in a
grey-area does 9.4 qualify for this bug-fix.

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/chr-is-still-too-loose-about-UTF8-code-points-tp5804232p5804270.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-05-16 18:51:01 Re: %d in log_line_prefix doesn't work for bg/autovacuum workers
Previous Message Andres Freund 2014-05-16 18:06:36 Re: %d in log_line_prefix doesn't work for bg/autovacuum workers