pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oleg Bartunov <oleg@sai.msu.su>
To: Marc G. Fournier <scrappy@postgresql.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: Reverse Index ... how to ...
Date: Wed, 5 Apr 2006 22:20:51 +0400 (MSD)
Message-ID: <Pine.GSO.4.63.0604052220030.23110@ra.sai.msu.su> (raw)
In-Reply-To: <20060405151239.F947@ganymede.hub.org>
References: <20060405151239.F947@ganymede.hub.org>

On Wed, 5 Apr 2006, Marc G. Fournier wrote:

>
> I'm still searching through Google and whatnot, but not finding anything off 
> the bat ... is there some way of creating a 'REVERSE INDEX' on a column in a 
> table?
>
> For instance, when I do a 'CLUSTER' to sort a table based on an INDEX, I'd 
> like to sort it in reverse order, so would need the INDEX to go from 
> 'GREATEST to LOWEST', vs 'LOWEST to GREATEST' ...

use something like
select * into new_table from old_table order by some_key desc;

>
> Thx
>
> ----
> Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
> Email: scrappy@hub.org           Yahoo!: yscrappy              ICQ: 7615664
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>

 	Regards,
 		Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83



view thread (4+ messages)  latest in thread

Message-ID: <Pine.GSO.4.63.0604052220030.23110@ra.sai.msu.su>
Permalink:  ../Pine.GSO.4.63.0604052220030.23110@ra.sai.msu.su/
Also on:    postgresql.org/message-id/Pine.GSO.4.63.0604052220030.23110@ra.sai.msu.su

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: oleg@sai.msu.su, scrappy@postgresql.org
  Subject: Re: Reverse Index ... how to ...
  In-Reply-To: <Pine.GSO.4.63.0604052220030.23110@ra.sai.msu.su>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox