From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Marcin Mańk <marcin(dot)mank(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)oss(dot)ntt(dot)co(dot)jp>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [v9.2] make_greater_string() does not return a string in some cases |
Date: | 2011-09-26 14:08:54 |
Message-ID: | 5358.1317046134@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> On fre, 2011-09-23 at 20:35 +0300, Marcin Mak wrote:
>> One idea:
>> col like 'foo%' could be translated to col >= 'foo' and col <= foo || 'zzz' , where 'z' is the largest possible character. This should be good enough for calculating stats.
>> How to find such a character, i do not know.
> That's what makes this so difficult.
> If we knew the largest character, we could probably also find the
> largest-1, largest-2, etc. characters and determine the total order of
> everything.
No, it's a hundred times worse than that, because in collations other
than C there typically *is* no total order. The collation behavior of
many characters is context-sensitive, thanks to the multi-pass behavior
of typical "dictionary" algorithms.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2011-09-26 14:30:32 | Re: [v9.2] make_greater_string() does not return a string in some cases |
Previous Message | Dean Heller | 2011-09-26 14:02:33 | BUG #6224: Installation Error of dotconnect for postgre SQL Professional |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-09-26 14:13:46 | Re: contrib/sepgsql regression tests are a no-go |
Previous Message | Robert Haas | 2011-09-26 14:06:45 | Re: [v9.2] Fix Leaky View Problem |