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

From sylsau
Subject Create an index with a sort condition
Date
Msg-id 1143630853.043754.111900@v46g2000cwv.googlegroups.com
Whole thread Raw
Responses Re: Create an index with a sort condition
List pgsql-general
Hello,

I use PostgreSQL 8.1 and I would like create and index on a table's
field with a sort condition on this field.
For example, I have a table named books and I want create an index on
the fields title and id_book with an order by id_book descendant.

I know how to create the index without this condition :

create index book_index on books(id_book, title);


But, I don't know to create this index with the sort condition.
Someone has an idea ?

Thanks to help me.

Sylvain.


pgsql-general by date:

Previous
From: Jo De Haes
Date:
Subject: Re: invalid page header
Next
From: "raj"
Date:
Subject: checking data type