Teodor Sigaev <[EMAIL PROTECTED]> writes:
> So, I must declare b-tree opclass for tsvector. Why?
> My supposition is to guarantee that operator < is really 'less-than'
> one. Is it?

Exactly.  We used to assume that any operator named '<' would be
suitable for sorting, but it's a lot safer to assume that an operator
associated with a b-tree opclass behaves in the right way.  Also there
are some optimizations possible as a result.  (It turns out that the
sorting code will end up using the comparison support function for the
opclass, and not the operator per se, because that way we only need one
function call per comparison.  Using the operator, we'd often need two
calls.)

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: 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