pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@oss.ntt.co.jp>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [v9.2] make_greater_string() does not return a string in some cases
Date: Thu, 22 Sep 2011 12:35:56 -0400
Message-ID: <23159.1316709356@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoaDz_Ri7NcLebzbb_EzTxEGy_mwwsenLPrh9JaTVSL1kA@mail.gmail.com>
References: <CA+TgmoYAoGSnk1zMEeq_RWB+D5OjfPX6zmXFetoSZfW70S1p6Q@mail.gmail.com>
	<20110711.155531.15100243.horiguchi.kyotaro@oss.ntt.co.jp>
	<20110712.161231.138791411.horiguchi.kyotaro@oss.ntt.co.jp>
	<20110914.111320.18404009.horiguchi.kyotaro@oss.ntt.co.jp>
	<CA+TgmoYO3UbyCekzDTdVWTG2goEQtr7H_f=9mous9u_uH_StSA@mail.gmail.com>
	<6425.1316656167@sss.pgh.pa.us>
	<CA+TgmoY9+ZUHNju7ERi7QM36FjiXzfT38S63564L_14qf3hgYg@mail.gmail.com>
	<8755.1316665444@sss.pgh.pa.us>
	<CA+Tgmoax-SHNgHe77cJZGsqgsB+Z=n_jzQZ5h0RG1+NcWGHkBg@mail.gmail.com>
	<18434.1316702188@sss.pgh.pa.us>
	<CA+Tgmoame4LOO=uF2G=sNMQgSDwXcwfrsg+gNbT64r=rTux-0Q@mail.gmail.com>
	<21348.1316706403@sss.pgh.pa.us>
	<CA+TgmoaDz_Ri7NcLebzbb_EzTxEGy_mwwsenLPrh9JaTVSL1kA@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Sep 22, 2011 at 11:46 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Well, the metric that we were indirectly using earlier was the
>> number of characters in a given locale for which the algorithm
>> fails to find a greater one (excluding whichever character is "last",
>> I guess, or you could just recognize there's always at least one).

> What about characters that sort differently in sequence than individually?

Yeah, there's a whole 'nother set of issues there, but the character
incrementer is unlikely to affect that very much either way, I think.

> But now that I think about it, what about using some
> slightly-less-stupid version of that approach as a fallback strategy?
> For example, we could pick, oh, say, 20 characters out of the space of
> code points, about evenly distributed under whatever collations we
> think are likely to be in use.

Sure, if the "increment the top byte" strategy proves to not accomplish
that effectively.  But I'd prefer not to design a complex strategy until
it's been proven that a simpler one doesn't work.

			regards, tom lane



view thread (57+ messages)  latest in thread

Message-ID: <23159.1316709356@sss.pgh.pa.us>
Permalink:  ../23159.1316709356@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23159.1316709356@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, 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: <23159.1316709356@sss.pgh.pa.us>
  References: <CA+TgmoYAoGSnk1zMEeq_RWB+D5OjfPX6zmXFetoSZfW70S1p6Q@mail.gmail.com> <20110711.155531.15100243.horiguchi.kyotaro@oss.ntt.co.jp> <20110712.161231.138791411.horiguchi.kyotaro@oss.ntt.co.jp> <20110914.111320.18404009.horiguchi.kyotaro@oss.ntt.co.jp> <CA+TgmoYO3UbyCekzDTdVWTG2goEQtr7H_f=9mous9u_uH_StSA@mail.gmail.com> <6425.1316656167@sss.pgh.pa.us> <CA+TgmoY9+ZUHNju7ERi7QM36FjiXzfT38S63564L_14qf3hgYg@mail.gmail.com> <8755.1316665444@sss.pgh.pa.us> <CA+Tgmoax-SHNgHe77cJZGsqgsB+Z=n_jzQZ5h0RG1+NcWGHkBg@mail.gmail.com> <18434.1316702188@sss.pgh.pa.us> <CA+Tgmoame4LOO=uF2G=sNMQgSDwXcwfrsg+gNbT64r=rTux-0Q@mail.gmail.com> <21348.1316706403@sss.pgh.pa.us> <CA+TgmoaDz_Ri7NcLebzbb_EzTxEGy_mwwsenLPrh9JaTVSL1kA@mail.gmail.com> <23159.1316709356@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox