Re: [HACKERS] advanced index (descending and table-presorted

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Greg Mitchell <gmitchell(at)atdesk(dot)com>
Cc: netsql <cekvenich(at)gmail(dot)com>, PostgreSQL-general <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] advanced index (descending and table-presorted
Date: 2006-11-21 20:58:00
Message-ID: 200611212058.kALKw0l02556@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

[ moved to General]

Greg Mitchell wrote:
> First off, not sure this is the right list for this question (maybe
> GENERAL, but HACKERS is for server coding)....
>
> > Can pgSQL 8.x do descending indexes like mySQL 5.1?
> > (so 1st column is descending and rest are asscending?)
>
> Not sure why you want this... But you could create an operator class
> with the operators backward I believe (i.e. make less-than use
> greater-than).

We have a TODO for this:

* Allow the creation of indexes with mixed ascending/descending
specifiers

This is possible now by creating an operator class with reversed sort
operators. One complexity is that NULLs would then appear at the start
of the result set, and this might affect certain sort types, like
merge join.

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-11-21 21:12:01 Re: statement_timeout
Previous Message garry saddington 2006-11-21 20:45:37 Re: pg_dump

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2006-11-21 20:59:43 Re: Open source databases '60 per cent
Previous Message Bruce Momjian 2006-11-21 20:56:18 Re: Open source databases '60 per cent