valgog <[EMAIL PROTECTED]> wrote ..
> On Jul 23, 7:00 pm, [EMAIL PROTECTED] (Tom Lane) wrote:
> > valgog <[EMAIL PROTECTED]> writes:
> > > how to build an multicolumn index with one column order ASCENDING and
> > > another column order DESCENDING?
> >
> > Use 8.3 ;-)
> >
> > In existing releases you could fake it with a custom reverse-sorting
> > operator class, but it's a pain in the neck to create one.

I've often gotten what I want by using a calculated index on (f1, -f2). ORDER 
BY will take an expression, e.g. ORDER BY f1, -f2. Simpler than a custom 
operator.

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to