Re: Create an index with a sort condition - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Create an index with a sort condition
Date
Msg-id 20060404055515.GD32226@svana.org
Whole thread Raw
In response to Re: Create an index with a sort condition  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Tue, Apr 04, 2006 at 01:40:52AM -0400, Tom Lane wrote:
> Martijn van Oosterhout <kleptog@svana.org> writes:
> > [ Q about reverse-sort opclasses ]
>
> > Well, if COLLATE support ever gets done, it'll fix this too and be SQL
> > compliant to boot.
>
> I keep having a nagging feeling that COLLATE is a completely
> inappropriate way to deal with reverse-sort semantics for non-textual
> datatypes.  Still waiting to see this patch ...

How so? All it does it invert the result of the comparison. If we do it
for textual types it'll work automatically for all other types too.

All the details of how it would work were described back here:
http://archives.postgresql.org/pgsql-hackers/2005-12/msg01121.php

The last patch unfortunatly no longer applies cleanly so you can't
really test it. If someone really wants this feature, now's the time to
pipe up.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.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.

Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: CREATE TABLE (with INHERITS) and ACCESS EXCLUSIVE locks
Next
From: Leon Pu
Date:
Subject: Re: Database restoration performance issue on PostgreSQL 7.4.7