pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tatsuhito Kasahara <kasahara.tatsuhito@oss.ntt.co.jp>
Cc: pgsql-bugs@postgresql.org
Subject: Re: make_greater_string() does not return a string in some cases
Date: Wed, 23 Jun 2010 18:23:39 -0400
Message-ID: <29535.1277331819@sss.pgh.pa.us> (raw)
In-Reply-To: <4C21D716.70808@oss.ntt.co.jp>
References: <4C1F389B.1010606@oss.ntt.co.jp>
	<13689.1277136605@sss.pgh.pa.us>
	<4C21D716.70808@oss.ntt.co.jp>

Tatsuhito Kasahara <kasahara.tatsuhito@oss.ntt.co.jp> writes:
> I have another idea.

> 1. We prepare new operators ( <,<=,>,=>,= ) for text and bytea.
> 2. In make_greater_string(), if
>    multi-byte-string was set and
>    using locale-C and
>    could not find greater string,
>    returns bytea which has greater byte-code of last-character.

> Is the idea reasonable ?

Maybe, but it only works for text_pattern_ops indexes not normal ones.
Not sure if people will be happy with maintaining a special index just
to cover this corner case.

I'm not convinced that there's enough of a problem here to be worth
sweating over.  If we're not able to generate a "greater" string with
the current rules, the odds are that the pattern is so close to the end
of the index range that a one-sided test is not going to make much
difference compared to a two-sided one.  

			regards, tom lane



view thread (57+ messages)  latest in thread

Message-ID: <29535.1277331819@sss.pgh.pa.us>
Permalink:  ../29535.1277331819@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29535.1277331819@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, kasahara.tatsuhito@oss.ntt.co.jp
  Subject: Re: make_greater_string() does not return a string in some cases
  In-Reply-To: <29535.1277331819@sss.pgh.pa.us>
  References: <4C1F389B.1010606@oss.ntt.co.jp> <13689.1277136605@sss.pgh.pa.us> <4C21D716.70808@oss.ntt.co.jp> <29535.1277331819@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