Re: sortsupport for text - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: sortsupport for text
Date
Msg-id 2CF4AD23-269D-45CA-B850-4E6ED3090537@phlo.org
Whole thread Raw
In response to Re: sortsupport for text  (Peter Geoghegan <peter@2ndquadrant.com>)
Responses Re: sortsupport for text  (Peter Geoghegan <peter@2ndquadrant.com>)
List pgsql-hackers
On Jun21, 2012, at 02:22 , Peter Geoghegan wrote:
> I've written a very small C++ program, which I've attached, that
> basically proves that this can still make a fairly large difference -
> I hope it's okay that that it's C++, but that allowed me to write the
> program quickly, with no dependencies for anyone who cares to try this
> out, other than a C++ compiler and the standard library.

Uh, are you sure the results aren't swapped? string_wrapper takes a
parameter called use_strcoll, and it indeed uses strcoll() if that
parameter is true, and strxfm() otherwise. But then it passes *false*
to determine the speed of strcoll(), and *true* to determine the speed
of strxfm()...

Also, place_random_string() needs to insert a terminating zero byte,
otherwise set_test segfaults, at least on my OSX machine.

best regards,
Florian Pflug



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Allow WAL information to recover corrupted pg_controldata
Next
From: Peter Geoghegan
Date:
Subject: Re: sortsupport for text