Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 2FC16B5DC03 for ; Tue, 18 Oct 2011 01:11:48 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 25651-04 for ; Tue, 18 Oct 2011 04:11:41 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 5D596B5DBCE for ; Tue, 18 Oct 2011 01:11:41 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p9I4BcRD026143; Tue, 18 Oct 2011 00:11:38 -0400 (EDT) To: Robert Haas cc: Kyotaro HORIGUCHI , pgsql-hackers@postgresql.org Subject: Re: [v9.2] make_greater_string() does not return a string in some cases In-reply-to: References: <20111007.132246.187325868.horiguchi.kyotaro@oss.ntt.co.jp> <20111011.165500.124520773.horiguchi.kyotaro@oss.ntt.co.jp> <20111013.124530.97708970.horiguchi.kyotaro@oss.ntt.co.jp> <25893.1318910085@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Tue, 18 Oct 2011 00:06:11 -0400" Date: Tue, 18 Oct 2011 00:11:38 -0400 Message-ID: <26142.1318911098@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201110/972 X-Sequence-Number: 196778 Robert Haas writes: > On Mon, Oct 17, 2011 at 11:54 PM, Tom Lane wrote: >> http://www.faqs.org/rfcs/rfc3629.html > I'm still confused. The input string is already known to be valid > UTF-8, so the second byte (if there is one) must be between 0x80 and > 0xBF. Therefore it will be neither 0xED nor 0xF4. I haven't read the patch lately, but ED and F4 are special as *first* bytes. Maybe the logic isn't quite right, or you read it wrong? regards, tom lane