mirror of
https://github.com/postgres/postgres.git
synced 2025-11-16 15:02:33 +03:00
Restructure operator classes to allow improved handling of cross-data-type
cases. Operator classes now exist within "operator families". While most families are equivalent to a single class, related classes can be grouped into one family to represent the fact that they are semantically compatible. Cross-type operators are now naturally adjunct parts of a family, without having to wedge them into a particular opclass as we had done originally. This commit restructures the catalogs and cleans up enough of the fallout so that everything still works at least as well as before, but most of the work needed to actually improve the planner's behavior will come later. Also, there are not yet CREATE/DROP/ALTER OPERATOR FAMILY commands; the only way to create a new family right now is to allow CREATE OPERATOR CLASS to make one by default. I owe some more documentation work, too. But that can all be done in smaller pieces once this infrastructure is in place.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/nodes/primnodes.h,v 1.119 2006/12/21 16:05:16 petere Exp $
|
||||
* $PostgreSQL: pgsql/src/include/nodes/primnodes.h,v 1.120 2006/12/23 00:43:13 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -654,7 +654,7 @@ typedef struct RowExpr
|
||||
*
|
||||
* We support row comparison for any operator that can be determined to
|
||||
* act like =, <>, <, <=, >, or >= (we determine this by looking for the
|
||||
* operator in btree opclasses). Note that the same operator name might
|
||||
* operator in btree opfamilies). Note that the same operator name might
|
||||
* map to a different operator for each pair of row elements, since the
|
||||
* element datatypes can vary.
|
||||
*
|
||||
@@ -679,7 +679,7 @@ typedef struct RowCompareExpr
|
||||
Expr xpr;
|
||||
RowCompareType rctype; /* LT LE GE or GT, never EQ or NE */
|
||||
List *opnos; /* OID list of pairwise comparison ops */
|
||||
List *opclasses; /* OID list of containing operator classes */
|
||||
List *opfamilies; /* OID list of containing operator families */
|
||||
List *largs; /* the left-hand input arguments */
|
||||
List *rargs; /* the right-hand input arguments */
|
||||
} RowCompareExpr;
|
||||
|
||||
Reference in New Issue
Block a user