Re: Range types
| От | Tom Lane |
|---|---|
| Тема | Re: Range types |
| Дата | |
| Msg-id | 15621.1260891108@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Range types (Nicolas Barbier <nicolas.barbier@gmail.com>) |
| Ответы |
Re: Range types
|
| Список | pgsql-hackers |
Nicolas Barbier <nicolas.barbier@gmail.com> writes:
> Assuming lexicographical ordering (first different character
> determines order; end-of-string is sorted before anything else),
> consider the following two strings:
> <whatever>
> and
> <same whatever as before> + the character with the lowest value in
> lexicographical ordering.
> I don't think it is possible to get anything in between those two strings.
OK, point taken. But in the real world, many locales use
non-lexicographical ordering.
In practice, even if you are willing to grant a maximum string
length, it is tough enough to find a string just a bit greater
than a given string, and damn near impossible to promise that
there will be no strings between. We learned that the hard way
trying to make LIKE prefix-match indexing work in non-C locales.
So the long and the short of it is that next/previous are not
going to work for string types, maxlength or no maxlength.
regards, tom lane
В списке pgsql-hackers по дате отправления: