pg_aggregate

存储聚合函数信息的系统表

pg_aggregate 是一个存储关于聚合函数信息的系统目录表。

按 PostgreSQL 版本定义

pg_aggregate (PostgreSQL 17)

               Table "pg_catalog.pg_aggregate"
      Column      |   Type   | Collation | Nullable | Default 
------------------+----------+-----------+----------+---------
 aggfnoid         | regproc  |           | not null | 
 aggkind          | "char"   |           | not null | 
 aggnumdirectargs | smallint |           | not null | 
 aggtransfn       | regproc  |           | not null | 
 aggfinalfn       | regproc  |           | not null | 
 aggcombinefn     | regproc  |           | not null | 
 aggserialfn      | regproc  |           | not null | 
 aggdeserialfn    | regproc  |           | not null | 
 aggmtransfn      | regproc  |           | not null | 
 aggminvtransfn   | regproc  |           | not null | 
 aggmfinalfn      | regproc  |           | not null | 
 aggfinalextra    | boolean  |           | not null | 
 aggmfinalextra   | boolean  |           | not null | 
 aggfinalmodify   | "char"   |           | not null | 
 aggmfinalmodify  | "char"   |           | not null | 
 aggsortop        | oid      |           | not null | 
 aggtranstype     | oid      |           | not null | 
 aggtransspace    | integer  |           | not null | 
 aggmtranstype    | oid      |           | not null | 
 aggmtransspace   | integer  |           | not null | 
 agginitval       | text     | C         |          | 
 aggminitval      | text     | C         |          | 
Indexes:
    "pg_aggregate_fnoid_index" PRIMARY KEY, btree (aggfnoid)
    

文档: pg_aggregate

pg_aggregate (PostgreSQL 16)

               Table "pg_catalog.pg_aggregate"
      Column      |   Type   | Collation | Nullable | Default 
------------------+----------+-----------+----------+---------
 aggfnoid         | regproc  |           | not null | 
 aggkind          | "char"   |           | not null | 
 aggnumdirectargs | smallint |           | not null | 
 aggtransfn       | regproc  |           | not null | 
 aggfinalfn       | regproc  |           | not null | 
 aggcombinefn     | regproc  |           | not null | 
 aggserialfn      | regproc  |           | not null | 
 aggdeserialfn    | regproc  |           | not null | 
 aggmtransfn      | regproc  |           | not null | 
 aggminvtransfn   | regproc  |           | not null | 
 aggmfinalfn      | regproc  |           | not null | 
 aggfinalextra    | boolean  |           | not null | 
 aggmfinalextra   | boolean  |           | not null | 
 aggfinalmodify   | "char"   |           | not null | 
 aggmfinalmodify  | "char"   |           | not null | 
 aggsortop        | oid      |           | not null | 
 aggtranstype     | oid      |           | not null | 
 aggtransspace    | integer  |           | not null | 
 aggmtranstype    | oid      |           | not null | 
 aggmtransspace   | integer  |           | not null | 
 agginitval       | text     | C         |          | 
 aggminitval      | text     | C         |          | 
Indexes:
    "pg_aggregate_fnoid_index" PRIMARY KEY, btree (aggfnoid)
    

文档: pg_aggregate

pg_aggregate (PostgreSQL 15)

               Table "pg_catalog.pg_aggregate"
      Column      |   Type   | Collation | Nullable | Default 
------------------+----------+-----------+----------+---------
 aggfnoid         | regproc  |           | not null | 
 aggkind          | "char"   |           | not null | 
 aggnumdirectargs | smallint |           | not null | 
 aggtransfn       | regproc  |           | not null | 
 aggfinalfn       | regproc  |           | not null | 
 aggcombinefn     | regproc  |           | not null | 
 aggserialfn      | regproc  |           | not null | 
 aggdeserialfn    | regproc  |           | not null | 
 aggmtransfn      | regproc  |           | not null | 
 aggminvtransfn   | regproc  |           | not null | 
 aggmfinalfn      | regproc  |           | not null | 
 aggfinalextra    | boolean  |           | not null | 
 aggmfinalextra   | boolean  |           | not null | 
 aggfinalmodify   | "char"   |           | not null | 
 aggmfinalmodify  | "char"   |           | not null | 
 aggsortop        | oid      |           | not null | 
 aggtranstype     | oid      |           | not null | 
 aggtransspace    | integer  |           | not null | 
 aggmtranstype    | oid      |           | not null | 
 aggmtransspace   | integer  |           | not null | 
 agginitval       | text     | C         |          | 
 aggminitval      | text     | C         |          | 
Indexes:
    "pg_aggregate_fnoid_index" PRIMARY KEY, btree (aggfnoid)
    

文档: pg_aggregate

pg_aggregate (PostgreSQL 14)

               Table "pg_catalog.pg_aggregate"
      Column      |   Type   | Collation | Nullable | Default 
------------------+----------+-----------+----------+---------
 aggfnoid         | regproc  |           | not null | 
 aggkind          | "char"   |           | not null | 
 aggnumdirectargs | smallint |           | not null | 
 aggtransfn       | regproc  |           | not null | 
 aggfinalfn       | regproc  |           | not null | 
 aggcombinefn     | regproc  |           | not null | 
 aggserialfn      | regproc  |           | not null | 
 aggdeserialfn    | regproc  |           | not null | 
 aggmtransfn      | regproc  |           | not null | 
 aggminvtransfn   | regproc  |           | not null | 
 aggmfinalfn      | regproc  |           | not null | 
 aggfinalextra    | boolean  |           | not null | 
 aggmfinalextra   | boolean  |           | not null | 
 aggfinalmodify   | "char"   |           | not null | 
 aggmfinalmodify  | "char"   |           | not null | 
 aggsortop        | oid      |           | not null | 
 aggtranstype     | oid      |           | not null | 
 aggtransspace    | integer  |           | not null | 
 aggmtranstype    | oid      |           | not null | 
 aggmtransspace   | integer  |           | not null | 
 agginitval       | text     | C         |          | 
 aggminitval      | text     | C         |          | 
Indexes:
    "pg_aggregate_fnoid_index" PRIMARY KEY, btree (aggfnoid)
    

文档: pg_aggregate

pg_aggregate (PostgreSQL 13)

               Table "pg_catalog.pg_aggregate"
      Column      |   Type   | Collation | Nullable | Default 
------------------+----------+-----------+----------+---------
 aggfnoid         | regproc  |           | not null | 
 aggkind          | "char"   |           | not null | 
 aggnumdirectargs | smallint |           | not null | 
 aggtransfn       | regproc  |           | not null | 
 aggfinalfn       | regproc  |           | not null | 
 aggcombinefn     | regproc  |           | not null | 
 aggserialfn      | regproc  |           | not null | 
 aggdeserialfn    | regproc  |           | not null | 
 aggmtransfn      | regproc  |           | not null | 
 aggminvtransfn   | regproc  |           | not null | 
 aggmfinalfn      | regproc  |           | not null | 
 aggfinalextra    | boolean  |           | not null | 
 aggmfinalextra   | boolean  |           | not null | 
 aggfinalmodify   | "char"   |           | not null | 
 aggmfinalmodify  | "char"   |           | not null | 
 aggsortop        | oid      |           | not null | 
 aggtranstype     | oid      |           | not null | 
 aggtransspace    | integer  |           | not null | 
 aggmtranstype    | oid      |           | not null | 
 aggmtransspace   | integer  |           | not null | 
 agginitval       | text     | C         |          | 
 aggminitval      | text     | C         |          | 
Indexes:
    "pg_aggregate_fnoid_index" UNIQUE, btree (aggfnoid)
    

文档: pg_aggregate

pg_aggregate (PostgreSQL 12)

               Table "pg_catalog.pg_aggregate"
      Column      |   Type   | Collation | Nullable | Default 
------------------+----------+-----------+----------+---------
 aggfnoid         | regproc  |           | not null | 
 aggkind          | "char"   |           | not null | 
 aggnumdirectargs | smallint |           | not null | 
 aggtransfn       | regproc  |           | not null | 
 aggfinalfn       | regproc  |           | not null | 
 aggcombinefn     | regproc  |           | not null | 
 aggserialfn      | regproc  |           | not null | 
 aggdeserialfn    | regproc  |           | not null | 
 aggmtransfn      | regproc  |           | not null | 
 aggminvtransfn   | regproc  |           | not null | 
 aggmfinalfn      | regproc  |           | not null | 
 aggfinalextra    | boolean  |           | not null | 
 aggmfinalextra   | boolean  |           | not null | 
 aggfinalmodify   | "char"   |           | not null | 
 aggmfinalmodify  | "char"   |           | not null | 
 aggsortop        | oid      |           | not null | 
 aggtranstype     | oid      |           | not null | 
 aggtransspace    | integer  |           | not null | 
 aggmtranstype    | oid      |           | not null | 
 aggmtransspace   | integer  |           | not null | 
 agginitval       | text     | C         |          | 
 aggminitval      | text     | C         |          | 
Indexes:
    "pg_aggregate_fnoid_index" UNIQUE, btree (aggfnoid)
    

文档: pg_aggregate

pg_aggregate (PostgreSQL 11)

               Table "pg_catalog.pg_aggregate"
      Column      |   Type   | Collation | Nullable | Default 
------------------+----------+-----------+----------+---------
 aggfnoid         | regproc  |           | not null | 
 aggkind          | "char"   |           | not null | 
 aggnumdirectargs | smallint |           | not null | 
 aggtransfn       | regproc  |           | not null | 
 aggfinalfn       | regproc  |           | not null | 
 aggcombinefn     | regproc  |           | not null | 
 aggserialfn      | regproc  |           | not null | 
 aggdeserialfn    | regproc  |           | not null | 
 aggmtransfn      | regproc  |           | not null | 
 aggminvtransfn   | regproc  |           | not null | 
 aggmfinalfn      | regproc  |           | not null | 
 aggfinalextra    | boolean  |           | not null | 
 aggmfinalextra   | boolean  |           | not null | 
 aggfinalmodify   | "char"   |           | not null | 
 aggmfinalmodify  | "char"   |           | not null | 
 aggsortop        | oid      |           | not null | 
 aggtranstype     | oid      |           | not null | 
 aggtransspace    | integer  |           | not null | 
 aggmtranstype    | oid      |           | not null | 
 aggmtransspace   | integer  |           | not null | 
 agginitval       | text     |           |          | 
 aggminitval      | text     |           |          | 
Indexes:
    "pg_aggregate_fnoid_index" UNIQUE, btree (aggfnoid)
    

文档: pg_aggregate

pg_aggregate (PostgreSQL 10)

               Table "pg_catalog.pg_aggregate"
      Column      |   Type   | Collation | Nullable | Default 
------------------+----------+-----------+----------+---------
 aggfnoid         | regproc  |           | not null | 
 aggkind          | "char"   |           | not null | 
 aggnumdirectargs | smallint |           | not null | 
 aggtransfn       | regproc  |           | not null | 
 aggfinalfn       | regproc  |           | not null | 
 aggcombinefn     | regproc  |           | not null | 
 aggserialfn      | regproc  |           | not null | 
 aggdeserialfn    | regproc  |           | not null | 
 aggmtransfn      | regproc  |           | not null | 
 aggminvtransfn   | regproc  |           | not null | 
 aggmfinalfn      | regproc  |           | not null | 
 aggfinalextra    | boolean  |           | not null | 
 aggmfinalextra   | boolean  |           | not null | 
 aggsortop        | oid      |           | not null | 
 aggtranstype     | oid      |           | not null | 
 aggtransspace    | integer  |           | not null | 
 aggmtranstype    | oid      |           | not null | 
 aggmtransspace   | integer  |           | not null | 
 agginitval       | text     |           |          | 
 aggminitval      | text     |           |          | 
Indexes:
    "pg_aggregate_fnoid_index" UNIQUE, btree (aggfnoid)
    

文档: pg_aggregate

pg_aggregate (PostgreSQL 9.6)

     Table "pg_catalog.pg_aggregate"
      Column      |   Type   | Modifiers 
------------------+----------+-----------
 aggfnoid         | regproc  | not null
 aggkind          | "char"   | not null
 aggnumdirectargs | smallint | not null
 aggtransfn       | regproc  | not null
 aggfinalfn       | regproc  | not null
 aggcombinefn     | regproc  | not null
 aggserialfn      | regproc  | not null
 aggdeserialfn    | regproc  | not null
 aggmtransfn      | regproc  | not null
 aggminvtransfn   | regproc  | not null
 aggmfinalfn      | regproc  | not null
 aggfinalextra    | boolean  | not null
 aggmfinalextra   | boolean  | not null
 aggsortop        | oid      | not null
 aggtranstype     | oid      | not null
 aggtransspace    | integer  | not null
 aggmtranstype    | oid      | not null
 aggmtransspace   | integer  | not null
 agginitval       | text     | 
 aggminitval      | text     | 
Indexes:
    "pg_aggregate_fnoid_index" UNIQUE, btree (aggfnoid)
    

文档: pg_aggregate

pg_aggregate (PostgreSQL 9.5)

     Table "pg_catalog.pg_aggregate"
      Column      |   Type   | Modifiers 
------------------+----------+-----------
 aggfnoid         | regproc  | not null
 aggkind          | "char"   | not null
 aggnumdirectargs | smallint | not null
 aggtransfn       | regproc  | not null
 aggfinalfn       | regproc  | not null
 aggmtransfn      | regproc  | not null
 aggminvtransfn   | regproc  | not null
 aggmfinalfn      | regproc  | not null
 aggfinalextra    | boolean  | not null
 aggmfinalextra   | boolean  | not null
 aggsortop        | oid      | not null
 aggtranstype     | oid      | not null
 aggtransspace    | integer  | not null
 aggmtranstype    | oid      | not null
 aggmtransspace   | integer  | not null
 agginitval       | text     | 
 aggminitval      | text     | 
Indexes:
    "pg_aggregate_fnoid_index" UNIQUE, btree (aggfnoid)
    

文档: pg_aggregate

pg_aggregate (PostgreSQL 9.4)

     Table "pg_catalog.pg_aggregate"
      Column      |   Type   | Modifiers 
------------------+----------+-----------
 aggfnoid         | regproc  | not null
 aggkind          | "char"   | not null
 aggnumdirectargs | smallint | not null
 aggtransfn       | regproc  | not null
 aggfinalfn       | regproc  | not null
 aggmtransfn      | regproc  | not null
 aggminvtransfn   | regproc  | not null
 aggmfinalfn      | regproc  | not null
 aggfinalextra    | boolean  | not null
 aggmfinalextra   | boolean  | not null
 aggsortop        | oid      | not null
 aggtranstype     | oid      | not null
 aggtransspace    | integer  | not null
 aggmtranstype    | oid      | not null
 aggmtransspace   | integer  | not null
 agginitval       | text     | 
 aggminitval      | text     | 
Indexes:
    "pg_aggregate_fnoid_index" UNIQUE, btree (aggfnoid)
    

文档: pg_aggregate

pg_aggregate (PostgreSQL 9.3)

  Table "pg_catalog.pg_aggregate"
    Column    |  Type   | Modifiers 
--------------+---------+-----------
 aggfnoid     | regproc | not null
 aggtransfn   | regproc | not null
 aggfinalfn   | regproc | not null
 aggsortop    | oid     | not null
 aggtranstype | oid     | not null
 agginitval   | text    | 
Indexes:
    "pg_aggregate_fnoid_index" UNIQUE, btree (aggfnoid)
    

文档: pg_aggregate

pg_aggregate (PostgreSQL 9.2)

  Table "pg_catalog.pg_aggregate"
    Column    |  Type   | Modifiers 
--------------+---------+-----------
 aggfnoid     | regproc | not null
 aggtransfn   | regproc | not null
 aggfinalfn   | regproc | not null
 aggsortop    | oid     | not null
 aggtranstype | oid     | not null
 agginitval   | text    | 
Indexes:
    "pg_aggregate_fnoid_index" UNIQUE, btree (aggfnoid)
    

文档: pg_aggregate

pg_aggregate (PostgreSQL 9.1)

  Table "pg_catalog.pg_aggregate"
    Column    |  Type   | Modifiers 
--------------+---------+-----------
 aggfnoid     | regproc | not null
 aggtransfn   | regproc | not null
 aggfinalfn   | regproc | not null
 aggsortop    | oid     | not null
 aggtranstype | oid     | not null
 agginitval   | text    | 
Indexes:
    "pg_aggregate_fnoid_index" UNIQUE, btree (aggfnoid)
    

文档: pg_aggregate

pg_aggregate (PostgreSQL 9.0)

  Table "pg_catalog.pg_aggregate"
    Column    |  Type   | Modifiers 
--------------+---------+-----------
 aggfnoid     | regproc | not null
 aggtransfn   | regproc | not null
 aggfinalfn   | regproc | not null
 aggsortop    | oid     | not null
 aggtranstype | oid     | not null
 agginitval   | text    | 
Indexes:
    "pg_aggregate_fnoid_index" UNIQUE, btree (aggfnoid)
    

文档: pg_aggregate

pg_aggregate (PostgreSQL 8.4)

  Table "pg_catalog.pg_aggregate"
    Column    |  Type   | Modifiers 
--------------+---------+-----------
 aggfnoid     | regproc | not null
 aggtransfn   | regproc | not null
 aggfinalfn   | regproc | not null
 aggsortop    | oid     | not null
 aggtranstype | oid     | not null
 agginitval   | text    | 
Indexes:
    "pg_aggregate_fnoid_index" UNIQUE, btree (aggfnoid)
    

文档: pg_aggregate

pg_aggregate (PostgreSQL 8.3)

  Table "pg_catalog.pg_aggregate"
    Column    |  Type   | Modifiers 
--------------+---------+-----------
 aggfnoid     | regproc | not null
 aggtransfn   | regproc | not null
 aggfinalfn   | regproc | not null
 aggsortop    | oid     | not null
 aggtranstype | oid     | not null
 agginitval   | text    | 
Indexes:
    "pg_aggregate_fnoid_index" UNIQUE, btree (aggfnoid)
    

文档: pg_aggregate

pg_aggregate (PostgreSQL 8.2)

  Table "pg_catalog.pg_aggregate"
    Column    |  Type   | Modifiers 
--------------+---------+-----------
 aggfnoid     | regproc | not null
 aggtransfn   | regproc | not null
 aggfinalfn   | regproc | not null
 aggsortop    | oid     | not null
 aggtranstype | oid     | not null
 agginitval   | text    | 
Indexes:
    "pg_aggregate_fnoid_index" UNIQUE, btree (aggfnoid oid_ops)
    

文档: pg_aggregate

更改历史记录

示例

postgres=# SELECT * FROM pg_aggregate WHERE aggfnoid::TEXT ='pg_catalog.count' LIMIT 1\x\g\x
Expanded display is on.
-[ RECORD 1 ]----+-----------------
aggfnoid         | pg_catalog.count
aggkind          | n
aggnumdirectargs | 0
aggtransfn       | int8inc_any
aggfinalfn       | -
aggcombinefn     | int8pl
aggserialfn      | -
aggdeserialfn    | -
aggmtransfn      | int8inc_any
aggminvtransfn   | int8dec_any
aggmfinalfn      | -
aggfinalextra    | f
aggmfinalextra   | f
aggfinalmodify   | r
aggmfinalmodify  | r
aggsortop        | 0
aggtranstype     | 20
aggtransspace    | 0
aggmtranstype    | 20
aggmtransspace   | 0
agginitval       | 0
aggminitval      | 0

分类

系统目录

反馈

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