Skip site navigation (1) Skip section navigation (2)

Re: make_greater_string() does not return a string in some cases

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tatsuhito Kasahara <kasahara(dot)tatsuhito(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: make_greater_string() does not return a string in some cases
Date: 2010-06-23 22:23:39
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Tatsuhito Kasahara <kasahara(dot)tatsuhito(at)oss(dot)ntt(dot)co(dot)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

In response to

pgsql-bugs by date

Next:From: Chris BrowneDate: 2010-06-24 01:02:43
Subject: Re: Postgres on AIX5.3 and AIX6.1
Previous:From: Tom LaneDate: 2010-06-23 21:24:50
Subject: Re: local_preload_libraries filenames converted to lowercase

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group