From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Geoghegan <peter(at)2ndquadrant(dot)com> |
Cc: | Greg Stark <stark(at)mit(dot)edu>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: sortsupport for text |
Date: | 2012-06-17 16:01:04 |
Message-ID: | 26600.1339948864@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Geoghegan <peter(at)2ndquadrant(dot)com> writes:
> The fly in the ointment for strxfrm() adoption may be the need to be
> consistent with this earlier behaviour:
> if strcoll claims two strings are equal, check it with strcmp, and
> sort according to strcmp if not identical.
> I'm not sure I agree with this decision; why should we presume to know
> better than the glibc locale what constitutes equality?
The killer reason why it must be like that is that you can't use hash
methods on text if text equality is some unknown condition subtly
different from bitwise equality. My recollection is that there were
some other problems as well, but I'm too lazy to search the archives
for you.
> It's seems very likely that the main
> one was the then-need to guard against poor quality qsort()
> implementations that went quadratic in the face of lots of duplicates,
No, I don't recall that that had anything to do with it.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Gianni Ciolli | 2012-06-17 16:02:53 | Re: [PATCH] Support for foreign keys with arrays |
Previous Message | Dave Page | 2012-06-17 15:54:13 | Re: libpq compression |