Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id D8A7CB5DC42 for ; Sat, 29 Oct 2011 16:35:36 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 17701-04 for ; Sat, 29 Oct 2011 19:35:30 +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 BD397B5D91F for ; Sat, 29 Oct 2011 16:35:30 -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 p9TJZR5o028653; Sat, 29 Oct 2011 15:35:27 -0400 (EDT) To: Robert Haas cc: horiguchi.kyotaro@oss.ntt.co.jp, pgsql-hackers@postgresql.org Subject: Re: [v9.2] make_greater_string() does not return a string in some cases In-reply-to: References: <20111030.021603.01379645.horiguchi.kyotaro@horiguti.oss.ntt.co.jp> Comments: In-reply-to Robert Haas message dated "Sat, 29 Oct 2011 14:26:28 -0400" Date: Sat, 29 Oct 2011 15:35:27 -0400 Message-ID: <28652.1319916927@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/1584 X-Sequence-Number: 197390 Robert Haas writes: > I've committed this, after a good deal of hacking on the comments, > some coding style cleanup, and one bug fix: Ummm ... why do the incrementer functions think they need to restore the previous value on failure? AFAICS that's a waste of code and cycles, since there is only one caller and it doesn't care in the least. I'm also quite distressed that you ignored my advice to limit the number of combinations tried. This patch could be horribly slow when dealing with wide characters, eg think what will happen when starting from U+10000. regards, tom lane