pg_opclass

包含索引访问方法操作类定义的系统表

pg_opclass 是一个包含索引访问方法操作符类 (opclass) 定义的系统目录表。

pg_opclass 一直存在于 PostgreSQL 中。

psql 命令

  • \dAc[+] 列出可用的操作符类

按 PostgreSQL 版本定义

pg_opclass (PostgreSQL 17)

              Table "pg_catalog.pg_opclass"
    Column    |  Type   | Collation | Nullable | Default 
--------------+---------+-----------+----------+---------
 oid          | oid     |           | not null | 
 opcmethod    | oid     |           | not null | 
 opcname      | name    |           | not null | 
 opcnamespace | oid     |           | not null | 
 opcowner     | oid     |           | not null | 
 opcfamily    | oid     |           | not null | 
 opcintype    | oid     |           | not null | 
 opcdefault   | boolean |           | not null | 
 opckeytype   | oid     |           | not null | 
Indexes:
    "pg_opclass_oid_index" PRIMARY KEY, btree (oid)
    "pg_opclass_am_name_nsp_index" UNIQUE CONSTRAINT, btree (opcmethod, opcname, opcnamespace)
    

文档: pg_opclass

pg_opclass (PostgreSQL 16)

              Table "pg_catalog.pg_opclass"
    Column    |  Type   | Collation | Nullable | Default 
--------------+---------+-----------+----------+---------
 oid          | oid     |           | not null | 
 opcmethod    | oid     |           | not null | 
 opcname      | name    |           | not null | 
 opcnamespace | oid     |           | not null | 
 opcowner     | oid     |           | not null | 
 opcfamily    | oid     |           | not null | 
 opcintype    | oid     |           | not null | 
 opcdefault   | boolean |           | not null | 
 opckeytype   | oid     |           | not null | 
Indexes:
    "pg_opclass_oid_index" PRIMARY KEY, btree (oid)
    "pg_opclass_am_name_nsp_index" UNIQUE CONSTRAINT, btree (opcmethod, opcname, opcnamespace)
    

文档: pg_opclass

pg_opclass (PostgreSQL 15)

              Table "pg_catalog.pg_opclass"
    Column    |  Type   | Collation | Nullable | Default 
--------------+---------+-----------+----------+---------
 oid          | oid     |           | not null | 
 opcmethod    | oid     |           | not null | 
 opcname      | name    |           | not null | 
 opcnamespace | oid     |           | not null | 
 opcowner     | oid     |           | not null | 
 opcfamily    | oid     |           | not null | 
 opcintype    | oid     |           | not null | 
 opcdefault   | boolean |           | not null | 
 opckeytype   | oid     |           | not null | 
Indexes:
    "pg_opclass_oid_index" PRIMARY KEY, btree (oid)
    "pg_opclass_am_name_nsp_index" UNIQUE CONSTRAINT, btree (opcmethod, opcname, opcnamespace)
    

文档: pg_opclass

pg_opclass (PostgreSQL 14)

              Table "pg_catalog.pg_opclass"
    Column    |  Type   | Collation | Nullable | Default 
--------------+---------+-----------+----------+---------
 oid          | oid     |           | not null | 
 opcmethod    | oid     |           | not null | 
 opcname      | name    |           | not null | 
 opcnamespace | oid     |           | not null | 
 opcowner     | oid     |           | not null | 
 opcfamily    | oid     |           | not null | 
 opcintype    | oid     |           | not null | 
 opcdefault   | boolean |           | not null | 
 opckeytype   | oid     |           | not null | 
Indexes:
    "pg_opclass_oid_index" PRIMARY KEY, btree (oid)
    "pg_opclass_am_name_nsp_index" UNIQUE CONSTRAINT, btree (opcmethod, opcname, opcnamespace)
    

文档: pg_opclass

pg_opclass (PostgreSQL 13)

              Table "pg_catalog.pg_opclass"
    Column    |  Type   | Collation | Nullable | Default 
--------------+---------+-----------+----------+---------
 oid          | oid     |           | not null | 
 opcmethod    | oid     |           | not null | 
 opcname      | name    |           | not null | 
 opcnamespace | oid     |           | not null | 
 opcowner     | oid     |           | not null | 
 opcfamily    | oid     |           | not null | 
 opcintype    | oid     |           | not null | 
 opcdefault   | boolean |           | not null | 
 opckeytype   | oid     |           | not null | 
Indexes:
    "pg_opclass_am_name_nsp_index" UNIQUE, btree (opcmethod, opcname, opcnamespace)
    "pg_opclass_oid_index" UNIQUE, btree (oid)
    

文档: pg_opclass

pg_opclass (PostgreSQL 12)

              Table "pg_catalog.pg_opclass"
    Column    |  Type   | Collation | Nullable | Default 
--------------+---------+-----------+----------+---------
 oid          | oid     |           | not null | 
 opcmethod    | oid     |           | not null | 
 opcname      | name    |           | not null | 
 opcnamespace | oid     |           | not null | 
 opcowner     | oid     |           | not null | 
 opcfamily    | oid     |           | not null | 
 opcintype    | oid     |           | not null | 
 opcdefault   | boolean |           | not null | 
 opckeytype   | oid     |           | not null | 
Indexes:
    "pg_opclass_am_name_nsp_index" UNIQUE, btree (opcmethod, opcname, opcnamespace)
    "pg_opclass_oid_index" UNIQUE, btree (oid)
    

文档: pg_opclass

pg_opclass (PostgreSQL 11)

              Table "pg_catalog.pg_opclass"
    Column    |  Type   | Collation | Nullable | Default 
--------------+---------+-----------+----------+---------
 opcmethod    | oid     |           | not null | 
 opcname      | name    |           | not null | 
 opcnamespace | oid     |           | not null | 
 opcowner     | oid     |           | not null | 
 opcfamily    | oid     |           | not null | 
 opcintype    | oid     |           | not null | 
 opcdefault   | boolean |           | not null | 
 opckeytype   | oid     |           | not null | 
Indexes:
    "pg_opclass_am_name_nsp_index" UNIQUE, btree (opcmethod, opcname, opcnamespace)
    "pg_opclass_oid_index" UNIQUE, btree (oid)
    

文档: pg_opclass

pg_opclass (PostgreSQL 10)

              Table "pg_catalog.pg_opclass"
    Column    |  Type   | Collation | Nullable | Default 
--------------+---------+-----------+----------+---------
 opcmethod    | oid     |           | not null | 
 opcname      | name    |           | not null | 
 opcnamespace | oid     |           | not null | 
 opcowner     | oid     |           | not null | 
 opcfamily    | oid     |           | not null | 
 opcintype    | oid     |           | not null | 
 opcdefault   | boolean |           | not null | 
 opckeytype   | oid     |           | not null | 
Indexes:
    "pg_opclass_am_name_nsp_index" UNIQUE, btree (opcmethod, opcname, opcnamespace)
    "pg_opclass_oid_index" UNIQUE, btree (oid)
    

文档: pg_opclass

pg_opclass (PostgreSQL 9.6)

   Table "pg_catalog.pg_opclass"
    Column    |  Type   | Modifiers 
--------------+---------+-----------
 opcmethod    | oid     | not null
 opcname      | name    | not null
 opcnamespace | oid     | not null
 opcowner     | oid     | not null
 opcfamily    | oid     | not null
 opcintype    | oid     | not null
 opcdefault   | boolean | not null
 opckeytype   | oid     | not null
Indexes:
    "pg_opclass_am_name_nsp_index" UNIQUE, btree (opcmethod, opcname, opcnamespace)
    "pg_opclass_oid_index" UNIQUE, btree (oid)
    

文档: pg_opclass

pg_opclass (PostgreSQL 9.5)

   Table "pg_catalog.pg_opclass"
    Column    |  Type   | Modifiers 
--------------+---------+-----------
 opcmethod    | oid     | not null
 opcname      | name    | not null
 opcnamespace | oid     | not null
 opcowner     | oid     | not null
 opcfamily    | oid     | not null
 opcintype    | oid     | not null
 opcdefault   | boolean | not null
 opckeytype   | oid     | not null
Indexes:
    "pg_opclass_am_name_nsp_index" UNIQUE, btree (opcmethod, opcname, opcnamespace)
    "pg_opclass_oid_index" UNIQUE, btree (oid)
    

文档: pg_opclass

pg_opclass (PostgreSQL 9.4)

   Table "pg_catalog.pg_opclass"
    Column    |  Type   | Modifiers 
--------------+---------+-----------
 opcmethod    | oid     | not null
 opcname      | name    | not null
 opcnamespace | oid     | not null
 opcowner     | oid     | not null
 opcfamily    | oid     | not null
 opcintype    | oid     | not null
 opcdefault   | boolean | not null
 opckeytype   | oid     | not null
Indexes:
    "pg_opclass_am_name_nsp_index" UNIQUE, btree (opcmethod, opcname, opcnamespace)
    "pg_opclass_oid_index" UNIQUE, btree (oid)
    

文档: pg_opclass

pg_opclass (PostgreSQL 9.3)

   Table "pg_catalog.pg_opclass"
    Column    |  Type   | Modifiers 
--------------+---------+-----------
 opcmethod    | oid     | not null
 opcname      | name    | not null
 opcnamespace | oid     | not null
 opcowner     | oid     | not null
 opcfamily    | oid     | not null
 opcintype    | oid     | not null
 opcdefault   | boolean | not null
 opckeytype   | oid     | not null
Indexes:
    "pg_opclass_am_name_nsp_index" UNIQUE, btree (opcmethod, opcname, opcnamespace)
    "pg_opclass_oid_index" UNIQUE, btree (oid)
    

文档: pg_opclass

pg_opclass (PostgreSQL 9.2)

   Table "pg_catalog.pg_opclass"
    Column    |  Type   | Modifiers 
--------------+---------+-----------
 opcmethod    | oid     | not null
 opcname      | name    | not null
 opcnamespace | oid     | not null
 opcowner     | oid     | not null
 opcfamily    | oid     | not null
 opcintype    | oid     | not null
 opcdefault   | boolean | not null
 opckeytype   | oid     | not null
Indexes:
    "pg_opclass_am_name_nsp_index" UNIQUE, btree (opcmethod, opcname, opcnamespace)
    "pg_opclass_oid_index" UNIQUE, btree (oid)
    

文档: pg_opclass

pg_opclass (PostgreSQL 9.1)

   Table "pg_catalog.pg_opclass"
    Column    |  Type   | Modifiers 
--------------+---------+-----------
 opcmethod    | oid     | not null
 opcname      | name    | not null
 opcnamespace | oid     | not null
 opcowner     | oid     | not null
 opcfamily    | oid     | not null
 opcintype    | oid     | not null
 opcdefault   | boolean | not null
 opckeytype   | oid     | not null
Indexes:
    "pg_opclass_am_name_nsp_index" UNIQUE, btree (opcmethod, opcname, opcnamespace)
    "pg_opclass_oid_index" UNIQUE, btree (oid)
    

文档: pg_opclass

pg_opclass (PostgreSQL 9.0)

   Table "pg_catalog.pg_opclass"
    Column    |  Type   | Modifiers 
--------------+---------+-----------
 opcmethod    | oid     | not null
 opcname      | name    | not null
 opcnamespace | oid     | not null
 opcowner     | oid     | not null
 opcfamily    | oid     | not null
 opcintype    | oid     | not null
 opcdefault   | boolean | not null
 opckeytype   | oid     | not null
Indexes:
    "pg_opclass_am_name_nsp_index" UNIQUE, btree (opcmethod, opcname, opcnamespace)
    "pg_opclass_oid_index" UNIQUE, btree (oid)
    

文档: pg_opclass

pg_opclass (PostgreSQL 8.4)

   Table "pg_catalog.pg_opclass"
    Column    |  Type   | Modifiers 
--------------+---------+-----------
 opcmethod    | oid     | not null
 opcname      | name    | not null
 opcnamespace | oid     | not null
 opcowner     | oid     | not null
 opcfamily    | oid     | not null
 opcintype    | oid     | not null
 opcdefault   | boolean | not null
 opckeytype   | oid     | not null
Indexes:
    "pg_opclass_am_name_nsp_index" UNIQUE, btree (opcmethod, opcname, opcnamespace)
    "pg_opclass_oid_index" UNIQUE, btree (oid)
    

文档: pg_opclass

pg_opclass (PostgreSQL 8.3)

   Table "pg_catalog.pg_opclass"
    Column    |  Type   | Modifiers 
--------------+---------+-----------
 opcmethod    | oid     | not null
 opcname      | name    | not null
 opcnamespace | oid     | not null
 opcowner     | oid     | not null
 opcfamily    | oid     | not null
 opcintype    | oid     | not null
 opcdefault   | boolean | not null
 opckeytype   | oid     | not null
Indexes:
    "pg_opclass_am_name_nsp_index" UNIQUE, btree (opcmethod, opcname, opcnamespace)
    "pg_opclass_oid_index" UNIQUE, btree (oid)
    

文档: pg_opclass

pg_opclass (PostgreSQL 8.2)

   Table "pg_catalog.pg_opclass"
    Column    |  Type   | Modifiers 
--------------+---------+-----------
 opcamid      | oid     | not null
 opcname      | name    | not null
 opcnamespace | oid     | not null
 opcowner     | oid     | not null
 opcintype    | oid     | not null
 opcdefault   | boolean | not null
 opckeytype   | oid     | not null
Indexes:
    "pg_opclass_am_name_nsp_index" UNIQUE, btree (opcamid, opcname, opcnamespace)
    "pg_opclass_oid_index" UNIQUE, btree (oid)
    

文档: pg_opclass

更改历史记录

注意:此列表中未反映 PostgreSQL 7.3 之前的任何更改。

分类

索引, 系统目录

另请参阅

pg_amop, pg_amproc, pg_opfamily, CREATE OPERATOR CLASS

反馈

提交关于 "pg_opclass" 的任何评论、建议或更正 此处