mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Opclasses live in namespaces. I also took the opportunity to create
an 'opclass owner' column in pg_opclass. Nothing is done with it at present, but since there are plans to invent a CREATE OPERATOR CLASS command soon, we'll probably want DROP OPERATOR CLASS too, which suggests that a notion of ownership would be a good idea.
This commit is contained in:
@ -212,10 +212,12 @@ CREATE FUNCTION g_cube_same(cube, cube, opaque) RETURNS opaque
|
||||
|
||||
|
||||
-- register the default opclass for indexing
|
||||
INSERT INTO pg_opclass (opcamid, opcname, opcintype, opcdefault, opckeytype)
|
||||
INSERT INTO pg_opclass (opcamid, opcname, opcnamespace, opcowner, opcintype, opcdefault, opckeytype)
|
||||
VALUES (
|
||||
(SELECT oid FROM pg_am WHERE amname = 'gist'),
|
||||
'gist_cube_ops',
|
||||
(SELECT oid FROM pg_namespace WHERE nspname = 'pg_catalog'),
|
||||
1, -- UID of superuser is hardwired to 1 as of PG 7.3
|
||||
(SELECT oid FROM pg_type WHERE typname = 'cube'),
|
||||
true,
|
||||
0);
|
||||
|
Reference in New Issue
Block a user