On Sun, Jan 21, 2007 at 09:39:32AM +0000, Gregory Stark wrote: > I guess it's tricky since there may be operators which have valid negators and > commutators but which don't get used by any btree operator class. Does > Postgres actually make use of the oprcom and oprnegate in that case? Could > they be used only for such operators to provide values for when they can't be > automatically deduced?
Sure, they're used whenever you have expressions of the form (CONST OP VAR) or NOT(VAR OP CONST). This is basic expression simplification that has little to do with b-trees in general. You have operators like "contains" and "is contained by" which would be opposites of eachother, but could never be used in a b-tree class. Have a nice day, -- Martijn van Oosterhout <email@example.com> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate.
Description: Digital signature