diff options
author | Tom Lane | 2006-12-23 00:43:13 +0000 |
---|---|---|
committer | Tom Lane | 2006-12-23 00:43:13 +0000 |
commit | a78fcfb5124379532ce35f3076679f04bd987d60 (patch) | |
tree | 345204410d4f015a9d20ff55ecc38de3d371c459 /src/tutorial | |
parent | d31ccb6c3e73901c44865bfce3f5dd20774f7a89 (diff) |
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.
Diffstat (limited to 'src/tutorial')
-rw-r--r-- | src/tutorial/syscat.source | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/tutorial/syscat.source b/src/tutorial/syscat.source index 50bd2e31a6..f6460d3fc0 100644 --- a/src/tutorial/syscat.source +++ b/src/tutorial/syscat.source @@ -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 |