Ivan Voras <ivoras@xxxxxxxxxxx> writes: > On 15/01/2014 12:36, Amit Langote wrote: >> Just to add to this, whenever strcoll() (a locale aware comparator) >> says two strings are equal, postgres re-compares them using strcmp(). > That seems odd and inefficient. Why would it be necessary? I would think > indexing (and other collation-sensitive operations) don't care what the > actual collation result is for arbitrary blobs of strings, as long as > they are stable? If we didn't do it like this, we could not use hashing techniques for text --- at least not unless we could find a hash function guaranteed to yield the same values for any two strings that strcoll() claims are equal. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general