Skip site navigation (1) Skip section navigation (2)

Re: qsort again (was Re: [PERFORM] Strange Create Index

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Markus Schaber <schabi(at)logix-tt(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: qsort again (was Re: [PERFORM] Strange Create Index
Date: 2006-02-16 22:51:02
Message-ID: 871wy23okp.fsf@stark.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-performance
Markus Schaber <schabi(at)logix-tt(dot)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


In response to

Responses

pgsql-performance by date

Next:From: PFCDate: 2006-02-16 23:05:23
Subject: Re: [HACKERS] qsort again (was Re: Strange Create Index
Previous:From: Martijn van OosterhoutDate: 2006-02-16 22:40:06
Subject: Re: qsort again (was Re: [PERFORM] Strange Create Index

pgsql-hackers by date

Next:From: PFCDate: 2006-02-16 23:05:23
Subject: Re: [HACKERS] qsort again (was Re: Strange Create Index
Previous:From: Martijn van OosterhoutDate: 2006-02-16 22:40:06
Subject: Re: qsort again (was Re: [PERFORM] Strange Create Index

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group