Re: comparison operators - Mailing list pgsql-hackers

From Andres Freund
Subject Re: comparison operators
Date
Msg-id 20140617232558.GE3115@awork2.anarazel.de
Whole thread Raw
In response to Re: comparison operators  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: comparison operators
List pgsql-hackers
On 2014-06-17 19:22:07 -0400, Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
> > I went to have a look at documenting the jsonb comparison operators, and 
> > found that the docs on comparison operators contain this:
> 
> >     Comparison operators are available for all relevant data types.
> 
> > They neglect to specify further, however. This doesn't seem very 
> > satisfactory. How is a user to know which are relevant? I know they are 
> > not available for xml and json, but are for jsonb. Just talking about 
> > "all relevant types" seems rather hand-wavy.
> 
> Well, there are 38 default btree opclasses in the standard system ATM.
> Are we worried enough about this to list them all explicitly?  Given the
> lack of complaints to date, I'm not.
> 
> However, if we try to fudge it by saying something like "available for
> all data types for which there is a natural linear order", I'm not
> sure that that's 100% true; and it's certainly not complete, since
> for instance jsonb's ordering is rather artificial, and the area-based
> orderings of the built-in geometric types are even more so.

It's not true for e.g. xid (which is rather annoying btw).

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: comparison operators
Next
From: Greg Stark
Date:
Subject: Re: Minmax indexes