Re: qsort again (was Re: [PERFORM] Strange Create Index - Mailing list pgsql-hackers

From Greg Stark
Subject Re: qsort again (was Re: [PERFORM] Strange Create Index
Date
Msg-id 871wy23okp.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: qsort again (was Re: [PERFORM] Strange Create Index  (Markus Schaber <schabi@logix-tt.com>)
Responses Re: qsort again (was Re: [PERFORM] Strange Create Index
List pgsql-hackers
Markus Schaber <schabi@logix-tt.com> writes:

> Hmm, to remove redundancy, I'd change the <= to a < and define:
>
> if a==b then f(a)==f(b)
> if a<b  then f(a)<=f(b)
>
> > Data types which could probably provide a useful function for f would be
> > int2, int4, oid, and possibly int8 and text (at least for SQL_ASCII).

How exactly do you imagine doing this for text?

I could see doing it for char(n)/varchar(n) where n<=4 in SQL_ASCII though.

--
greg

pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: qsort again (was Re: [PERFORM] Strange Create Index
Next
From: Mark Lewis
Date:
Subject: Re: qsort again (was Re: [PERFORM] Strange Create Index