Re: [GENERAL] Create an index with a sort condition

2006-04-03 Thread Martijn van Oosterhout
On Tue, Apr 04, 2006 at 01:40:52AM -0400, Tom Lane wrote: > Martijn van Oosterhout 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 >

Re: [GENERAL] Create an index with a sort condition

2006-04-03 Thread Tom Lane
Martijn van Oosterhout 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 dat

Re: [GENERAL] Create an index with a sort condition

2006-04-03 Thread Martijn van Oosterhout
On Mon, Apr 03, 2006 at 12:48:22PM -0400, Jim Nasby wrote: > I believe he's talking about something like > > CREATE INDEX books__id_title ON books(id_book, title DESC); > > which of course we don't support. But you can define a custom set of > operators that work backwards and use those to defi

Re: [GENERAL] Create an index with a sort condition

2006-04-03 Thread Jim Nasby
On Mar 29, 2006, at 2:57 PM, Simon Riggs wrote: On Wed, 2006-03-29 at 03:14 -0800, sylsau wrote: 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

Re: [GENERAL] Create an index with a sort condition

2006-03-29 Thread Simon Riggs
On Wed, 2006-03-29 at 03:14 -0800, sylsau wrote: > 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 descen