pg_type

存储数据类型信息的系统表

pg_type 是一个存储数据类型信息的系统目录表。

pg_type 一直存在于 PostgreSQL 中。

按 PostgreSQL 版本定义

pg_type (PostgreSQL 17)

                   Table "pg_catalog.pg_type"
     Column     |     Type     | Collation | Nullable | Default 
----------------+--------------+-----------+----------+---------
 oid            | oid          |           | not null | 
 typname        | name         |           | not null | 
 typnamespace   | oid          |           | not null | 
 typowner       | oid          |           | not null | 
 typlen         | smallint     |           | not null | 
 typbyval       | boolean      |           | not null | 
 typtype        | "char"       |           | not null | 
 typcategory    | "char"       |           | not null | 
 typispreferred | boolean      |           | not null | 
 typisdefined   | boolean      |           | not null | 
 typdelim       | "char"       |           | not null | 
 typrelid       | oid          |           | not null | 
 typsubscript   | regproc      |           | not null | 
 typelem        | oid          |           | not null | 
 typarray       | oid          |           | not null | 
 typinput       | regproc      |           | not null | 
 typoutput      | regproc      |           | not null | 
 typreceive     | regproc      |           | not null | 
 typsend        | regproc      |           | not null | 
 typmodin       | regproc      |           | not null | 
 typmodout      | regproc      |           | not null | 
 typanalyze     | regproc      |           | not null | 
 typalign       | "char"       |           | not null | 
 typstorage     | "char"       |           | not null | 
 typnotnull     | boolean      |           | not null | 
 typbasetype    | oid          |           | not null | 
 typtypmod      | integer      |           | not null | 
 typndims       | integer      |           | not null | 
 typcollation   | oid          |           | not null | 
 typdefaultbin  | pg_node_tree | C         |          | 
 typdefault     | text         | C         |          | 
 typacl         | aclitem[]    |           |          | 
Indexes:
    "pg_type_oid_index" PRIMARY KEY, btree (oid)
    "pg_type_typname_nsp_index" UNIQUE CONSTRAINT, btree (typname, typnamespace)
    

文档: pg_type

pg_type (PostgreSQL 16)

                   Table "pg_catalog.pg_type"
     Column     |     Type     | Collation | Nullable | Default 
----------------+--------------+-----------+----------+---------
 oid            | oid          |           | not null | 
 typname        | name         |           | not null | 
 typnamespace   | oid          |           | not null | 
 typowner       | oid          |           | not null | 
 typlen         | smallint     |           | not null | 
 typbyval       | boolean      |           | not null | 
 typtype        | "char"       |           | not null | 
 typcategory    | "char"       |           | not null | 
 typispreferred | boolean      |           | not null | 
 typisdefined   | boolean      |           | not null | 
 typdelim       | "char"       |           | not null | 
 typrelid       | oid          |           | not null | 
 typsubscript   | regproc      |           | not null | 
 typelem        | oid          |           | not null | 
 typarray       | oid          |           | not null | 
 typinput       | regproc      |           | not null | 
 typoutput      | regproc      |           | not null | 
 typreceive     | regproc      |           | not null | 
 typsend        | regproc      |           | not null | 
 typmodin       | regproc      |           | not null | 
 typmodout      | regproc      |           | not null | 
 typanalyze     | regproc      |           | not null | 
 typalign       | "char"       |           | not null | 
 typstorage     | "char"       |           | not null | 
 typnotnull     | boolean      |           | not null | 
 typbasetype    | oid          |           | not null | 
 typtypmod      | integer      |           | not null | 
 typndims       | integer      |           | not null | 
 typcollation   | oid          |           | not null | 
 typdefaultbin  | pg_node_tree | C         |          | 
 typdefault     | text         | C         |          | 
 typacl         | aclitem[]    |           |          | 
Indexes:
    "pg_type_oid_index" PRIMARY KEY, btree (oid)
    "pg_type_typname_nsp_index" UNIQUE CONSTRAINT, btree (typname, typnamespace)
    

文档: pg_type

pg_type (PostgreSQL 15)

                   Table "pg_catalog.pg_type"
     Column     |     Type     | Collation | Nullable | Default 
----------------+--------------+-----------+----------+---------
 oid            | oid          |           | not null | 
 typname        | name         |           | not null | 
 typnamespace   | oid          |           | not null | 
 typowner       | oid          |           | not null | 
 typlen         | smallint     |           | not null | 
 typbyval       | boolean      |           | not null | 
 typtype        | "char"       |           | not null | 
 typcategory    | "char"       |           | not null | 
 typispreferred | boolean      |           | not null | 
 typisdefined   | boolean      |           | not null | 
 typdelim       | "char"       |           | not null | 
 typrelid       | oid          |           | not null | 
 typsubscript   | regproc      |           | not null | 
 typelem        | oid          |           | not null | 
 typarray       | oid          |           | not null | 
 typinput       | regproc      |           | not null | 
 typoutput      | regproc      |           | not null | 
 typreceive     | regproc      |           | not null | 
 typsend        | regproc      |           | not null | 
 typmodin       | regproc      |           | not null | 
 typmodout      | regproc      |           | not null | 
 typanalyze     | regproc      |           | not null | 
 typalign       | "char"       |           | not null | 
 typstorage     | "char"       |           | not null | 
 typnotnull     | boolean      |           | not null | 
 typbasetype    | oid          |           | not null | 
 typtypmod      | integer      |           | not null | 
 typndims       | integer      |           | not null | 
 typcollation   | oid          |           | not null | 
 typdefaultbin  | pg_node_tree | C         |          | 
 typdefault     | text         | C         |          | 
 typacl         | aclitem[]    |           |          | 
Indexes:
    "pg_type_oid_index" PRIMARY KEY, btree (oid)
    "pg_type_typname_nsp_index" UNIQUE CONSTRAINT, btree (typname, typnamespace)
    

文档: pg_type

pg_type (PostgreSQL 14)

                   Table "pg_catalog.pg_type"
     Column     |     Type     | Collation | Nullable | Default 
----------------+--------------+-----------+----------+---------
 oid            | oid          |           | not null | 
 typname        | name         |           | not null | 
 typnamespace   | oid          |           | not null | 
 typowner       | oid          |           | not null | 
 typlen         | smallint     |           | not null | 
 typbyval       | boolean      |           | not null | 
 typtype        | "char"       |           | not null | 
 typcategory    | "char"       |           | not null | 
 typispreferred | boolean      |           | not null | 
 typisdefined   | boolean      |           | not null | 
 typdelim       | "char"       |           | not null | 
 typrelid       | oid          |           | not null | 
 typsubscript   | regproc      |           | not null | 
 typelem        | oid          |           | not null | 
 typarray       | oid          |           | not null | 
 typinput       | regproc      |           | not null | 
 typoutput      | regproc      |           | not null | 
 typreceive     | regproc      |           | not null | 
 typsend        | regproc      |           | not null | 
 typmodin       | regproc      |           | not null | 
 typmodout      | regproc      |           | not null | 
 typanalyze     | regproc      |           | not null | 
 typalign       | "char"       |           | not null | 
 typstorage     | "char"       |           | not null | 
 typnotnull     | boolean      |           | not null | 
 typbasetype    | oid          |           | not null | 
 typtypmod      | integer      |           | not null | 
 typndims       | integer      |           | not null | 
 typcollation   | oid          |           | not null | 
 typdefaultbin  | pg_node_tree | C         |          | 
 typdefault     | text         | C         |          | 
 typacl         | aclitem[]    |           |          | 
Indexes:
    "pg_type_oid_index" PRIMARY KEY, btree (oid)
    "pg_type_typname_nsp_index" UNIQUE CONSTRAINT, btree (typname, typnamespace)
    

文档: pg_type

pg_type (PostgreSQL 13)

                   Table "pg_catalog.pg_type"
     Column     |     Type     | Collation | Nullable | Default 
----------------+--------------+-----------+----------+---------
 oid            | oid          |           | not null | 
 typname        | name         |           | not null | 
 typnamespace   | oid          |           | not null | 
 typowner       | oid          |           | not null | 
 typlen         | smallint     |           | not null | 
 typbyval       | boolean      |           | not null | 
 typtype        | "char"       |           | not null | 
 typcategory    | "char"       |           | not null | 
 typispreferred | boolean      |           | not null | 
 typisdefined   | boolean      |           | not null | 
 typdelim       | "char"       |           | not null | 
 typrelid       | oid          |           | not null | 
 typelem        | oid          |           | not null | 
 typarray       | oid          |           | not null | 
 typinput       | regproc      |           | not null | 
 typoutput      | regproc      |           | not null | 
 typreceive     | regproc      |           | not null | 
 typsend        | regproc      |           | not null | 
 typmodin       | regproc      |           | not null | 
 typmodout      | regproc      |           | not null | 
 typanalyze     | regproc      |           | not null | 
 typalign       | "char"       |           | not null | 
 typstorage     | "char"       |           | not null | 
 typnotnull     | boolean      |           | not null | 
 typbasetype    | oid          |           | not null | 
 typtypmod      | integer      |           | not null | 
 typndims       | integer      |           | not null | 
 typcollation   | oid          |           | not null | 
 typdefaultbin  | pg_node_tree | C         |          | 
 typdefault     | text         | C         |          | 
 typacl         | aclitem[]    |           |          | 
Indexes:
    "pg_type_oid_index" UNIQUE, btree (oid)
    "pg_type_typname_nsp_index" UNIQUE, btree (typname, typnamespace)
    

文档: pg_type

pg_type (PostgreSQL 12)

                   Table "pg_catalog.pg_type"
     Column     |     Type     | Collation | Nullable | Default 
----------------+--------------+-----------+----------+---------
 oid            | oid          |           | not null | 
 typname        | name         |           | not null | 
 typnamespace   | oid          |           | not null | 
 typowner       | oid          |           | not null | 
 typlen         | smallint     |           | not null | 
 typbyval       | boolean      |           | not null | 
 typtype        | "char"       |           | not null | 
 typcategory    | "char"       |           | not null | 
 typispreferred | boolean      |           | not null | 
 typisdefined   | boolean      |           | not null | 
 typdelim       | "char"       |           | not null | 
 typrelid       | oid          |           | not null | 
 typelem        | oid          |           | not null | 
 typarray       | oid          |           | not null | 
 typinput       | regproc      |           | not null | 
 typoutput      | regproc      |           | not null | 
 typreceive     | regproc      |           | not null | 
 typsend        | regproc      |           | not null | 
 typmodin       | regproc      |           | not null | 
 typmodout      | regproc      |           | not null | 
 typanalyze     | regproc      |           | not null | 
 typalign       | "char"       |           | not null | 
 typstorage     | "char"       |           | not null | 
 typnotnull     | boolean      |           | not null | 
 typbasetype    | oid          |           | not null | 
 typtypmod      | integer      |           | not null | 
 typndims       | integer      |           | not null | 
 typcollation   | oid          |           | not null | 
 typdefaultbin  | pg_node_tree | C         |          | 
 typdefault     | text         | C         |          | 
 typacl         | aclitem[]    |           |          | 
Indexes:
    "pg_type_oid_index" UNIQUE, btree (oid)
    "pg_type_typname_nsp_index" UNIQUE, btree (typname, typnamespace)
    

文档: pg_type

pg_type (PostgreSQL 11)

                   Table "pg_catalog.pg_type"
     Column     |     Type     | Collation | Nullable | Default 
----------------+--------------+-----------+----------+---------
 typname        | name         |           | not null | 
 typnamespace   | oid          |           | not null | 
 typowner       | oid          |           | not null | 
 typlen         | smallint     |           | not null | 
 typbyval       | boolean      |           | not null | 
 typtype        | "char"       |           | not null | 
 typcategory    | "char"       |           | not null | 
 typispreferred | boolean      |           | not null | 
 typisdefined   | boolean      |           | not null | 
 typdelim       | "char"       |           | not null | 
 typrelid       | oid          |           | not null | 
 typelem        | oid          |           | not null | 
 typarray       | oid          |           | not null | 
 typinput       | regproc      |           | not null | 
 typoutput      | regproc      |           | not null | 
 typreceive     | regproc      |           | not null | 
 typsend        | regproc      |           | not null | 
 typmodin       | regproc      |           | not null | 
 typmodout      | regproc      |           | not null | 
 typanalyze     | regproc      |           | not null | 
 typalign       | "char"       |           | not null | 
 typstorage     | "char"       |           | not null | 
 typnotnull     | boolean      |           | not null | 
 typbasetype    | oid          |           | not null | 
 typtypmod      | integer      |           | not null | 
 typndims       | integer      |           | not null | 
 typcollation   | oid          |           | not null | 
 typdefaultbin  | pg_node_tree |           |          | 
 typdefault     | text         |           |          | 
 typacl         | aclitem[]    |           |          | 
Indexes:
    "pg_type_oid_index" UNIQUE, btree (oid)
    "pg_type_typname_nsp_index" UNIQUE, btree (typname, typnamespace)
    

文档: pg_type

pg_type (PostgreSQL 10)

                   Table "pg_catalog.pg_type"
     Column     |     Type     | Collation | Nullable | Default 
----------------+--------------+-----------+----------+---------
 typname        | name         |           | not null | 
 typnamespace   | oid          |           | not null | 
 typowner       | oid          |           | not null | 
 typlen         | smallint     |           | not null | 
 typbyval       | boolean      |           | not null | 
 typtype        | "char"       |           | not null | 
 typcategory    | "char"       |           | not null | 
 typispreferred | boolean      |           | not null | 
 typisdefined   | boolean      |           | not null | 
 typdelim       | "char"       |           | not null | 
 typrelid       | oid          |           | not null | 
 typelem        | oid          |           | not null | 
 typarray       | oid          |           | not null | 
 typinput       | regproc      |           | not null | 
 typoutput      | regproc      |           | not null | 
 typreceive     | regproc      |           | not null | 
 typsend        | regproc      |           | not null | 
 typmodin       | regproc      |           | not null | 
 typmodout      | regproc      |           | not null | 
 typanalyze     | regproc      |           | not null | 
 typalign       | "char"       |           | not null | 
 typstorage     | "char"       |           | not null | 
 typnotnull     | boolean      |           | not null | 
 typbasetype    | oid          |           | not null | 
 typtypmod      | integer      |           | not null | 
 typndims       | integer      |           | not null | 
 typcollation   | oid          |           | not null | 
 typdefaultbin  | pg_node_tree |           |          | 
 typdefault     | text         |           |          | 
 typacl         | aclitem[]    |           |          | 
Indexes:
    "pg_type_oid_index" UNIQUE, btree (oid)
    "pg_type_typname_nsp_index" UNIQUE, btree (typname, typnamespace)
    

文档: pg_type

pg_type (PostgreSQL 9.6)

        Table "pg_catalog.pg_type"
     Column     |     Type     | Modifiers 
----------------+--------------+-----------
 typname        | name         | not null
 typnamespace   | oid          | not null
 typowner       | oid          | not null
 typlen         | smallint     | not null
 typbyval       | boolean      | not null
 typtype        | "char"       | not null
 typcategory    | "char"       | not null
 typispreferred | boolean      | not null
 typisdefined   | boolean      | not null
 typdelim       | "char"       | not null
 typrelid       | oid          | not null
 typelem        | oid          | not null
 typarray       | oid          | not null
 typinput       | regproc      | not null
 typoutput      | regproc      | not null
 typreceive     | regproc      | not null
 typsend        | regproc      | not null
 typmodin       | regproc      | not null
 typmodout      | regproc      | not null
 typanalyze     | regproc      | not null
 typalign       | "char"       | not null
 typstorage     | "char"       | not null
 typnotnull     | boolean      | not null
 typbasetype    | oid          | not null
 typtypmod      | integer      | not null
 typndims       | integer      | not null
 typcollation   | oid          | not null
 typdefaultbin  | pg_node_tree | 
 typdefault     | text         | 
 typacl         | aclitem[]    | 
Indexes:
    "pg_type_oid_index" UNIQUE, btree (oid)
    "pg_type_typname_nsp_index" UNIQUE, btree (typname, typnamespace)
    

文档: pg_type

pg_type (PostgreSQL 9.5)

        Table "pg_catalog.pg_type"
     Column     |     Type     | Modifiers 
----------------+--------------+-----------
 typname        | name         | not null
 typnamespace   | oid          | not null
 typowner       | oid          | not null
 typlen         | smallint     | not null
 typbyval       | boolean      | not null
 typtype        | "char"       | not null
 typcategory    | "char"       | not null
 typispreferred | boolean      | not null
 typisdefined   | boolean      | not null
 typdelim       | "char"       | not null
 typrelid       | oid          | not null
 typelem        | oid          | not null
 typarray       | oid          | not null
 typinput       | regproc      | not null
 typoutput      | regproc      | not null
 typreceive     | regproc      | not null
 typsend        | regproc      | not null
 typmodin       | regproc      | not null
 typmodout      | regproc      | not null
 typanalyze     | regproc      | not null
 typalign       | "char"       | not null
 typstorage     | "char"       | not null
 typnotnull     | boolean      | not null
 typbasetype    | oid          | not null
 typtypmod      | integer      | not null
 typndims       | integer      | not null
 typcollation   | oid          | not null
 typdefaultbin  | pg_node_tree | 
 typdefault     | text         | 
 typacl         | aclitem[]    | 
Indexes:
    "pg_type_oid_index" UNIQUE, btree (oid)
    "pg_type_typname_nsp_index" UNIQUE, btree (typname, typnamespace)
    

文档: pg_type

pg_type (PostgreSQL 9.4)

        Table "pg_catalog.pg_type"
     Column     |     Type     | Modifiers 
----------------+--------------+-----------
 typname        | name         | not null
 typnamespace   | oid          | not null
 typowner       | oid          | not null
 typlen         | smallint     | not null
 typbyval       | boolean      | not null
 typtype        | "char"       | not null
 typcategory    | "char"       | not null
 typispreferred | boolean      | not null
 typisdefined   | boolean      | not null
 typdelim       | "char"       | not null
 typrelid       | oid          | not null
 typelem        | oid          | not null
 typarray       | oid          | not null
 typinput       | regproc      | not null
 typoutput      | regproc      | not null
 typreceive     | regproc      | not null
 typsend        | regproc      | not null
 typmodin       | regproc      | not null
 typmodout      | regproc      | not null
 typanalyze     | regproc      | not null
 typalign       | "char"       | not null
 typstorage     | "char"       | not null
 typnotnull     | boolean      | not null
 typbasetype    | oid          | not null
 typtypmod      | integer      | not null
 typndims       | integer      | not null
 typcollation   | oid          | not null
 typdefaultbin  | pg_node_tree | 
 typdefault     | text         | 
 typacl         | aclitem[]    | 
Indexes:
    "pg_type_oid_index" UNIQUE, btree (oid)
    "pg_type_typname_nsp_index" UNIQUE, btree (typname, typnamespace)
    

文档: pg_type

pg_type (PostgreSQL 9.3)

        Table "pg_catalog.pg_type"
     Column     |     Type     | Modifiers 
----------------+--------------+-----------
 typname        | name         | not null
 typnamespace   | oid          | not null
 typowner       | oid          | not null
 typlen         | smallint     | not null
 typbyval       | boolean      | not null
 typtype        | "char"       | not null
 typcategory    | "char"       | not null
 typispreferred | boolean      | not null
 typisdefined   | boolean      | not null
 typdelim       | "char"       | not null
 typrelid       | oid          | not null
 typelem        | oid          | not null
 typarray       | oid          | not null
 typinput       | regproc      | not null
 typoutput      | regproc      | not null
 typreceive     | regproc      | not null
 typsend        | regproc      | not null
 typmodin       | regproc      | not null
 typmodout      | regproc      | not null
 typanalyze     | regproc      | not null
 typalign       | "char"       | not null
 typstorage     | "char"       | not null
 typnotnull     | boolean      | not null
 typbasetype    | oid          | not null
 typtypmod      | integer      | not null
 typndims       | integer      | not null
 typcollation   | oid          | not null
 typdefaultbin  | pg_node_tree | 
 typdefault     | text         | 
 typacl         | aclitem[]    | 
Indexes:
    "pg_type_oid_index" UNIQUE, btree (oid)
    "pg_type_typname_nsp_index" UNIQUE, btree (typname, typnamespace)
    

文档: pg_type

pg_type (PostgreSQL 9.2)

        Table "pg_catalog.pg_type"
     Column     |     Type     | Modifiers 
----------------+--------------+-----------
 typname        | name         | not null
 typnamespace   | oid          | not null
 typowner       | oid          | not null
 typlen         | smallint     | not null
 typbyval       | boolean      | not null
 typtype        | "char"       | not null
 typcategory    | "char"       | not null
 typispreferred | boolean      | not null
 typisdefined   | boolean      | not null
 typdelim       | "char"       | not null
 typrelid       | oid          | not null
 typelem        | oid          | not null
 typarray       | oid          | not null
 typinput       | regproc      | not null
 typoutput      | regproc      | not null
 typreceive     | regproc      | not null
 typsend        | regproc      | not null
 typmodin       | regproc      | not null
 typmodout      | regproc      | not null
 typanalyze     | regproc      | not null
 typalign       | "char"       | not null
 typstorage     | "char"       | not null
 typnotnull     | boolean      | not null
 typbasetype    | oid          | not null
 typtypmod      | integer      | not null
 typndims       | integer      | not null
 typcollation   | oid          | not null
 typdefaultbin  | pg_node_tree | 
 typdefault     | text         | 
 typacl         | aclitem[]    | 
Indexes:
    "pg_type_oid_index" UNIQUE, btree (oid)
    "pg_type_typname_nsp_index" UNIQUE, btree (typname, typnamespace)
    

文档: pg_type

pg_type (PostgreSQL 9.1)

        Table "pg_catalog.pg_type"
     Column     |     Type     | Modifiers 
----------------+--------------+-----------
 typname        | name         | not null
 typnamespace   | oid          | not null
 typowner       | oid          | not null
 typlen         | smallint     | not null
 typbyval       | boolean      | not null
 typtype        | "char"       | not null
 typcategory    | "char"       | not null
 typispreferred | boolean      | not null
 typisdefined   | boolean      | not null
 typdelim       | "char"       | not null
 typrelid       | oid          | not null
 typelem        | oid          | not null
 typarray       | oid          | not null
 typinput       | regproc      | not null
 typoutput      | regproc      | not null
 typreceive     | regproc      | not null
 typsend        | regproc      | not null
 typmodin       | regproc      | not null
 typmodout      | regproc      | not null
 typanalyze     | regproc      | not null
 typalign       | "char"       | not null
 typstorage     | "char"       | not null
 typnotnull     | boolean      | not null
 typbasetype    | oid          | not null
 typtypmod      | integer      | not null
 typndims       | integer      | not null
 typcollation   | oid          | not null
 typdefaultbin  | pg_node_tree | 
 typdefault     | text         | 
Indexes:
    "pg_type_oid_index" UNIQUE, btree (oid)
    "pg_type_typname_nsp_index" UNIQUE, btree (typname, typnamespace)
    

文档: pg_type

pg_type (PostgreSQL 9.0)

      Table "pg_catalog.pg_type"
     Column     |   Type   | Modifiers 
----------------+----------+-----------
 typname        | name     | not null
 typnamespace   | oid      | not null
 typowner       | oid      | not null
 typlen         | smallint | not null
 typbyval       | boolean  | not null
 typtype        | "char"   | not null
 typcategory    | "char"   | not null
 typispreferred | boolean  | not null
 typisdefined   | boolean  | not null
 typdelim       | "char"   | not null
 typrelid       | oid      | not null
 typelem        | oid      | not null
 typarray       | oid      | not null
 typinput       | regproc  | not null
 typoutput      | regproc  | not null
 typreceive     | regproc  | not null
 typsend        | regproc  | not null
 typmodin       | regproc  | not null
 typmodout      | regproc  | not null
 typanalyze     | regproc  | not null
 typalign       | "char"   | not null
 typstorage     | "char"   | not null
 typnotnull     | boolean  | not null
 typbasetype    | oid      | not null
 typtypmod      | integer  | not null
 typndims       | integer  | not null
 typdefaultbin  | text     | 
 typdefault     | text     | 
Indexes:
    "pg_type_oid_index" UNIQUE, btree (oid)
    "pg_type_typname_nsp_index" UNIQUE, btree (typname, typnamespace)
    

文档: pg_type

pg_type (PostgreSQL 8.4)

      Table "pg_catalog.pg_type"
     Column     |   Type   | Modifiers 
----------------+----------+-----------
 typname        | name     | not null
 typnamespace   | oid      | not null
 typowner       | oid      | not null
 typlen         | smallint | not null
 typbyval       | boolean  | not null
 typtype        | "char"   | not null
 typcategory    | "char"   | not null
 typispreferred | boolean  | not null
 typisdefined   | boolean  | not null
 typdelim       | "char"   | not null
 typrelid       | oid      | not null
 typelem        | oid      | not null
 typarray       | oid      | not null
 typinput       | regproc  | not null
 typoutput      | regproc  | not null
 typreceive     | regproc  | not null
 typsend        | regproc  | not null
 typmodin       | regproc  | not null
 typmodout      | regproc  | not null
 typanalyze     | regproc  | not null
 typalign       | "char"   | not null
 typstorage     | "char"   | not null
 typnotnull     | boolean  | not null
 typbasetype    | oid      | not null
 typtypmod      | integer  | not null
 typndims       | integer  | not null
 typdefaultbin  | text     | 
 typdefault     | text     | 
Indexes:
    "pg_type_oid_index" UNIQUE, btree (oid)
    "pg_type_typname_nsp_index" UNIQUE, btree (typname, typnamespace)
    

文档: pg_type

pg_type (PostgreSQL 8.3)

      Table "pg_catalog.pg_type"
    Column     |   Type   | Modifiers 
---------------+----------+-----------
 typname       | name     | not null
 typnamespace  | oid      | not null
 typowner      | oid      | not null
 typlen        | smallint | not null
 typbyval      | boolean  | not null
 typtype       | "char"   | not null
 typisdefined  | boolean  | not null
 typdelim      | "char"   | not null
 typrelid      | oid      | not null
 typelem       | oid      | not null
 typarray      | oid      | not null
 typinput      | regproc  | not null
 typoutput     | regproc  | not null
 typreceive    | regproc  | not null
 typsend       | regproc  | not null
 typmodin      | regproc  | not null
 typmodout     | regproc  | not null
 typanalyze    | regproc  | not null
 typalign      | "char"   | not null
 typstorage    | "char"   | not null
 typnotnull    | boolean  | not null
 typbasetype   | oid      | not null
 typtypmod     | integer  | not null
 typndims      | integer  | not null
 typdefaultbin | text     | 
 typdefault    | text     | 
Indexes:
    "pg_type_oid_index" UNIQUE, btree (oid)
    "pg_type_typname_nsp_index" UNIQUE, btree (typname, typnamespace)
    

文档: pg_type

pg_type (PostgreSQL 8.2)

      Table "pg_catalog.pg_type"
    Column     |   Type   | Modifiers 
---------------+----------+-----------
 typname       | name     | not null
 typnamespace  | oid      | not null
 typowner      | oid      | not null
 typlen        | smallint | not null
 typbyval      | boolean  | not null
 typtype       | "char"   | not null
 typisdefined  | boolean  | not null
 typdelim      | "char"   | not null
 typrelid      | oid      | not null
 typelem       | oid      | not null
 typinput      | regproc  | not null
 typoutput     | regproc  | not null
 typreceive    | regproc  | not null
 typsend       | regproc  | not null
 typanalyze    | regproc  | not null
 typalign      | "char"   | not null
 typstorage    | "char"   | not null
 typnotnull    | boolean  | not null
 typbasetype   | oid      | not null
 typtypmod     | integer  | not null
 typndims      | integer  | not null
 typdefaultbin | text     | 
 typdefault    | text     | 
Indexes:
    "pg_type_oid_index" UNIQUE, btree (oid)
    "pg_type_typname_nsp_index" UNIQUE, btree (typname, typnamespace)
    

文档: pg_type

更改历史

开发中

源代码

PostgreSQL 8.4 (提交 039dfbfd) 和 PostgreSQL 11 (提交 cefa3871) 之间,存在一个额外的源文件 src/include/catalog/pg_type_fn.h,以允许前端代码包含目录定义。

分类

数据类型, 系统目录

另请参阅

pg_range

反馈

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