Re: [HACKERS] Simplifying pg_am representation of index sortability

2007-01-21 Thread Tom Lane
Martijn van Oosterhout writes: > 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. A quick count shows that 46% of the entries in pg_operator that have an oprcom link are not in any btree opclass. For oprn

Re: [HACKERS] Simplifying pg_am representation of index sortability

2007-01-21 Thread Martijn van Oosterhout
On Sun, Jan 21, 2007 at 09:39:32AM +, 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 > the

Re: [HACKERS] Simplifying pg_am representation of index sortability

2007-01-21 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > So I'm thinking that the pg_am columns amorderstrategy and amdescorder are > redundant and should be replaced with a simple boolean, "amcansort" perhaps. > Any objections? Any chance of getting rid of the remaining inter-operator relationship columns in p

[HACKERS] Simplifying pg_am representation of index sortability

2007-01-20 Thread Tom Lane
With the just-committed changes in PathKey representation, the core backend is now pretty well invested in the assumption that index AMs that can deliver sorted results will use btree-compatible strategy numbers for their order-related operators. This doesn't seem to me to be any huge limitation (