mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +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:
@ -7,7 +7,7 @@
|
||||
-- Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
|
||||
-- Portions Copyright (c) 1994, Regents of the University of California
|
||||
--
|
||||
-- $PostgreSQL: pgsql/src/tutorial/syscat.source,v 1.16 2006/03/05 15:59:11 momjian Exp $
|
||||
-- $PostgreSQL: pgsql/src/tutorial/syscat.source,v 1.17 2006/12/23 00:43:13 tgl Exp $
|
||||
--
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@ -165,18 +165,18 @@ SELECT n.nspname, p.proname, format_type(t.oid, null) as typname
|
||||
|
||||
|
||||
--
|
||||
-- lists all the operator classes that can be used with each access method
|
||||
-- as well as the operators that cn be used with the respective operator
|
||||
-- classes
|
||||
-- lists all the operator families that can be used with each access method
|
||||
-- as well as the operators that can be used with the respective operator
|
||||
-- families
|
||||
--
|
||||
SELECT n.nspname, am.amname, opc.opcname, opr.oprname
|
||||
FROM pg_namespace n, pg_am am, pg_opclass opc,
|
||||
SELECT am.amname, n.nspname, opf.opfname, opr.oprname
|
||||
FROM pg_namespace n, pg_am am, pg_opfamily opf,
|
||||
pg_amop amop, pg_operator opr
|
||||
WHERE opc.opcnamespace = n.oid
|
||||
and opc.opcamid = am.oid
|
||||
and amop.amopclaid = opc.oid
|
||||
WHERE opf.opfnamespace = n.oid
|
||||
and opf.opfmethod = am.oid
|
||||
and amop.amopfamily = opf.oid
|
||||
and amop.amopopr = opr.oid
|
||||
ORDER BY nspname, amname, opcname, oprname;
|
||||
ORDER BY nspname, amname, opfname, oprname;
|
||||
|
||||
--
|
||||
-- Reset the search path
|
||||
|
Reference in New Issue
Block a user