pg_transform

存储转换信息的系统表

pg_transform 是一个存储关于数据类型之间以及过程语言之间转换信息的系统目录表。

pg_transform 添加于PostgreSQL 9.5

按 PostgreSQL 版本定义

pg_transform (PostgreSQL 17)

            Table "pg_catalog.pg_transform"
   Column   |  Type   | Collation | Nullable | Default 
------------+---------+-----------+----------+---------
 oid        | oid     |           | not null | 
 trftype    | oid     |           | not null | 
 trflang    | oid     |           | not null | 
 trffromsql | regproc |           | not null | 
 trftosql   | regproc |           | not null | 
Indexes:
    "pg_transform_oid_index" PRIMARY KEY, btree (oid)
    "pg_transform_type_lang_index" UNIQUE CONSTRAINT, btree (trftype, trflang)
    

文档: pg_transform

pg_transform (PostgreSQL 16)

            Table "pg_catalog.pg_transform"
   Column   |  Type   | Collation | Nullable | Default 
------------+---------+-----------+----------+---------
 oid        | oid     |           | not null | 
 trftype    | oid     |           | not null | 
 trflang    | oid     |           | not null | 
 trffromsql | regproc |           | not null | 
 trftosql   | regproc |           | not null | 
Indexes:
    "pg_transform_oid_index" PRIMARY KEY, btree (oid)
    "pg_transform_type_lang_index" UNIQUE CONSTRAINT, btree (trftype, trflang)
    

文档: pg_transform

pg_transform (PostgreSQL 15)

            Table "pg_catalog.pg_transform"
   Column   |  Type   | Collation | Nullable | Default 
------------+---------+-----------+----------+---------
 oid        | oid     |           | not null | 
 trftype    | oid     |           | not null | 
 trflang    | oid     |           | not null | 
 trffromsql | regproc |           | not null | 
 trftosql   | regproc |           | not null | 
Indexes:
    "pg_transform_oid_index" PRIMARY KEY, btree (oid)
    "pg_transform_type_lang_index" UNIQUE CONSTRAINT, btree (trftype, trflang)
    

文档: pg_transform

pg_transform (PostgreSQL 14)

            Table "pg_catalog.pg_transform"
   Column   |  Type   | Collation | Nullable | Default 
------------+---------+-----------+----------+---------
 oid        | oid     |           | not null | 
 trftype    | oid     |           | not null | 
 trflang    | oid     |           | not null | 
 trffromsql | regproc |           | not null | 
 trftosql   | regproc |           | not null | 
Indexes:
    "pg_transform_oid_index" PRIMARY KEY, btree (oid)
    "pg_transform_type_lang_index" UNIQUE CONSTRAINT, btree (trftype, trflang)
    

文档: pg_transform

pg_transform (PostgreSQL 13)

            Table "pg_catalog.pg_transform"
   Column   |  Type   | Collation | Nullable | Default 
------------+---------+-----------+----------+---------
 oid        | oid     |           | not null | 
 trftype    | oid     |           | not null | 
 trflang    | oid     |           | not null | 
 trffromsql | regproc |           | not null | 
 trftosql   | regproc |           | not null | 
Indexes:
    "pg_transform_oid_index" UNIQUE, btree (oid)
    "pg_transform_type_lang_index" UNIQUE, btree (trftype, trflang)
    

文档: pg_transform

pg_transform (PostgreSQL 12)

            Table "pg_catalog.pg_transform"
   Column   |  Type   | Collation | Nullable | Default 
------------+---------+-----------+----------+---------
 oid        | oid     |           | not null | 
 trftype    | oid     |           | not null | 
 trflang    | oid     |           | not null | 
 trffromsql | regproc |           | not null | 
 trftosql   | regproc |           | not null | 
Indexes:
    "pg_transform_oid_index" UNIQUE, btree (oid)
    "pg_transform_type_lang_index" UNIQUE, btree (trftype, trflang)
    

文档: pg_transform

pg_transform (PostgreSQL 11)

            Table "pg_catalog.pg_transform"
   Column   |  Type   | Collation | Nullable | Default 
------------+---------+-----------+----------+---------
 trftype    | oid     |           | not null | 
 trflang    | oid     |           | not null | 
 trffromsql | regproc |           | not null | 
 trftosql   | regproc |           | not null | 
Indexes:
    "pg_transform_oid_index" UNIQUE, btree (oid)
    "pg_transform_type_lang_index" UNIQUE, btree (trftype, trflang)
    

文档: pg_transform

pg_transform (PostgreSQL 10)

            Table "pg_catalog.pg_transform"
   Column   |  Type   | Collation | Nullable | Default 
------------+---------+-----------+----------+---------
 trftype    | oid     |           | not null | 
 trflang    | oid     |           | not null | 
 trffromsql | regproc |           | not null | 
 trftosql   | regproc |           | not null | 
Indexes:
    "pg_transform_oid_index" UNIQUE, btree (oid)
    "pg_transform_type_lang_index" UNIQUE, btree (trftype, trflang)
    

文档: pg_transform

pg_transform (PostgreSQL 9.6)

 Table "pg_catalog.pg_transform"
   Column   |  Type   | Modifiers 
------------+---------+-----------
 trftype    | oid     | not null
 trflang    | oid     | not null
 trffromsql | regproc | not null
 trftosql   | regproc | not null
Indexes:
    "pg_transform_oid_index" UNIQUE, btree (oid)
    "pg_transform_type_lang_index" UNIQUE, btree (trftype, trflang)
    

文档: pg_transform

pg_transform (PostgreSQL 9.5)

 Table "pg_catalog.pg_transform"
   Column   |  Type   | Modifiers 
------------+---------+-----------
 trftype    | oid     | not null
 trflang    | oid     | not null
 trffromsql | regproc | not null
 trftosql   | regproc | not null
Indexes:
    "pg_transform_oid_index" UNIQUE, btree (oid)
    "pg_transform_type_lang_index" UNIQUE, btree (trftype, trflang)
    

文档: pg_transform

更改历史记录

pg_transform 自从在PostgreSQL 9.5中添加后就没有修改过。

示例

安装hstore_plperl后创建的条目

postgres=# CREATE EXTENSION hstore_plperl CASCADE;
NOTICE:  installing required extension "hstore"
NOTICE:  installing required extension "plperl"
CREATE EXTENSION

postgres=# SELECT * FROM pg_transform;
  oid  | trftype | trflang |    trffromsql    |     trftosql     
-------+---------+---------+------------------+------------------
 16589 |   16457 |   16585 | hstore_to_plperl | plperl_to_hstore
(1 row)

分类

过程语言, 系统目录

另请参阅

CREATE TRANSFORM

反馈

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