Martijn van Oosterhout <kleptog@svana.org> writes:

> On Sun, Sep 18, 2005 at 11:23:01PM -0400, Tom Lane wrote:
> <snip>
> > class families" to relate opclasses for different datatypes.  Basically
> > I'd like to solve most of these issues by constructing a new layer atop
> > opclasses, not by deciding that an opclass doesn't convey the full story
> > about the behavior of an index column.

The thing is that these opclasses you're describing are closely related. It
ought to be possible to use a single index to produce results in any of the
four orders you describe.

> Where I'm currently going is creating a table of COLLATE orders. These
> collate orders would refer to operator classes but "tweak" them. For
> example, things like:
> 
> - Sort ascending or descending (descending reverses the bt*cmp test)
> - NULLs first or last
> - Locale for text types
> - etc

These aren't all related in the same way. While it obviously isn't hard to
produce results ascending or descending, and it shouldn't be hard to produce
NULLs first or last regardless of where they appear in the index, it would be
utterly impossible to use an index built with the wrong locale collation.

-- 
greg


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to