Re: Create an index with a sort condition

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Jim Nasby <jnasby(at)pervasive(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, sylsau <sylsau14(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Create an index with a sort condition
Date: 2006-04-04 05:32:40
Message-ID: 20060404053240.GC32226@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Apr 03, 2006 at 12:48:22PM -0400, Jim Nasby wrote:
> I believe he's talking about something like
>
> CREATE INDEX books__id_title ON books(id_book, title DESC);
>
> which of course we don't support. But you can define a custom set of
> operators that work backwards and use those to define the index, and
> then use them in the ORDER BY.
>
> BTW, is there a TODO for this? Second request for it I've seen in a
> week...

Well, if COLLATE support ever gets done, it'll fix this too and be SQL
compliant to boot. Unfortunatly I havn't had much time to work on this
recently and there hasn't been much interest externally. Last time I
was bogged down by keeping up with the number of commits to the sort
code which is ofcourse intimately related to this.

One day...
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-04-04 05:40:52 Re: Create an index with a sort condition
Previous Message Martijn van Oosterhout 2006-04-04 05:25:18 Re: Log Slow Queries