mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +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:
@ -459,9 +459,9 @@ AS
|
||||
|
||||
--GIN
|
||||
--mark built-in gin's _int4_ops as non default
|
||||
update pg_opclass set opcdefault = 'f' where
|
||||
pg_opclass.opcamid = (select pg_am.oid from pg_am where amname='gin') and
|
||||
opcname = '_int4_ops';
|
||||
update pg_catalog.pg_opclass set opcdefault = 'f'
|
||||
where opcmethod = (select oid from pg_catalog.pg_am where amname='gin') and
|
||||
opcname = '_int4_ops';
|
||||
|
||||
CREATE FUNCTION ginint4_queryextract(internal, internal, int2)
|
||||
RETURNS internal
|
||||
|
@ -124,7 +124,7 @@ DROP FUNCTION querytree(query_int);
|
||||
|
||||
DROP TYPE query_int CASCADE;
|
||||
|
||||
update pg_opclass set opcdefault = 't' where
|
||||
pg_opclass.opcamid = (select pg_am.oid from pg_am where amname='gin') and
|
||||
opcname = '_int4_ops';
|
||||
|
||||
--mark built-in gin's _int4_ops as default again
|
||||
update pg_catalog.pg_opclass set opcdefault = 't'
|
||||
where opcmethod = (select oid from pg_catalog.pg_am where amname='gin') and
|
||||
opcname = '_int4_ops';
|
||||
|
Reference in New Issue
Block a user