pg_language

一个系统表,存储有关函数或存储过程可用语言的信息

pg_language 是一个存储有关函数或存储过程可用过程语言的信息的系统目录表。

pg_language 一直存在于 PostgreSQL 中。

psql 命令

\dL 列出可用的语言。

按 PostgreSQL 版本定义

pg_language (PostgreSQL 17)

               Table "pg_catalog.pg_language"
    Column     |   Type    | Collation | Nullable | Default 
---------------+-----------+-----------+----------+---------
 oid           | oid       |           | not null | 
 lanname       | name      |           | not null | 
 lanowner      | oid       |           | not null | 
 lanispl       | boolean   |           | not null | 
 lanpltrusted  | boolean   |           | not null | 
 lanplcallfoid | oid       |           | not null | 
 laninline     | oid       |           | not null | 
 lanvalidator  | oid       |           | not null | 
 lanacl        | aclitem[] |           |          | 
Indexes:
    "pg_language_oid_index" PRIMARY KEY, btree (oid)
    "pg_language_name_index" UNIQUE CONSTRAINT, btree (lanname)
    

文档: pg_language

pg_language (PostgreSQL 16)

               Table "pg_catalog.pg_language"
    Column     |   Type    | Collation | Nullable | Default 
---------------+-----------+-----------+----------+---------
 oid           | oid       |           | not null | 
 lanname       | name      |           | not null | 
 lanowner      | oid       |           | not null | 
 lanispl       | boolean   |           | not null | 
 lanpltrusted  | boolean   |           | not null | 
 lanplcallfoid | oid       |           | not null | 
 laninline     | oid       |           | not null | 
 lanvalidator  | oid       |           | not null | 
 lanacl        | aclitem[] |           |          | 
Indexes:
    "pg_language_oid_index" PRIMARY KEY, btree (oid)
    "pg_language_name_index" UNIQUE CONSTRAINT, btree (lanname)
    

文档: pg_language

pg_language (PostgreSQL 15)

               Table "pg_catalog.pg_language"
    Column     |   Type    | Collation | Nullable | Default 
---------------+-----------+-----------+----------+---------
 oid           | oid       |           | not null | 
 lanname       | name      |           | not null | 
 lanowner      | oid       |           | not null | 
 lanispl       | boolean   |           | not null | 
 lanpltrusted  | boolean   |           | not null | 
 lanplcallfoid | oid       |           | not null | 
 laninline     | oid       |           | not null | 
 lanvalidator  | oid       |           | not null | 
 lanacl        | aclitem[] |           |          | 
Indexes:
    "pg_language_oid_index" PRIMARY KEY, btree (oid)
    "pg_language_name_index" UNIQUE CONSTRAINT, btree (lanname)
    

文档: pg_language

pg_language (PostgreSQL 14)

               Table "pg_catalog.pg_language"
    Column     |   Type    | Collation | Nullable | Default 
---------------+-----------+-----------+----------+---------
 oid           | oid       |           | not null | 
 lanname       | name      |           | not null | 
 lanowner      | oid       |           | not null | 
 lanispl       | boolean   |           | not null | 
 lanpltrusted  | boolean   |           | not null | 
 lanplcallfoid | oid       |           | not null | 
 laninline     | oid       |           | not null | 
 lanvalidator  | oid       |           | not null | 
 lanacl        | aclitem[] |           |          | 
Indexes:
    "pg_language_oid_index" PRIMARY KEY, btree (oid)
    "pg_language_name_index" UNIQUE CONSTRAINT, btree (lanname)
    

文档: pg_language

pg_language (PostgreSQL 13)

               Table "pg_catalog.pg_language"
    Column     |   Type    | Collation | Nullable | Default 
---------------+-----------+-----------+----------+---------
 oid           | oid       |           | not null | 
 lanname       | name      |           | not null | 
 lanowner      | oid       |           | not null | 
 lanispl       | boolean   |           | not null | 
 lanpltrusted  | boolean   |           | not null | 
 lanplcallfoid | oid       |           | not null | 
 laninline     | oid       |           | not null | 
 lanvalidator  | oid       |           | not null | 
 lanacl        | aclitem[] |           |          | 
Indexes:
    "pg_language_name_index" UNIQUE, btree (lanname)
    "pg_language_oid_index" UNIQUE, btree (oid)
    

文档: pg_language

pg_language (PostgreSQL 12)

               Table "pg_catalog.pg_language"
    Column     |   Type    | Collation | Nullable | Default 
---------------+-----------+-----------+----------+---------
 oid           | oid       |           | not null | 
 lanname       | name      |           | not null | 
 lanowner      | oid       |           | not null | 
 lanispl       | boolean   |           | not null | 
 lanpltrusted  | boolean   |           | not null | 
 lanplcallfoid | oid       |           | not null | 
 laninline     | oid       |           | not null | 
 lanvalidator  | oid       |           | not null | 
 lanacl        | aclitem[] |           |          | 
Indexes:
    "pg_language_name_index" UNIQUE, btree (lanname)
    "pg_language_oid_index" UNIQUE, btree (oid)
    

文档: pg_language

pg_language (PostgreSQL 11)

               Table "pg_catalog.pg_language"
    Column     |   Type    | Collation | Nullable | Default 
---------------+-----------+-----------+----------+---------
 lanname       | name      |           | not null | 
 lanowner      | oid       |           | not null | 
 lanispl       | boolean   |           | not null | 
 lanpltrusted  | boolean   |           | not null | 
 lanplcallfoid | oid       |           | not null | 
 laninline     | oid       |           | not null | 
 lanvalidator  | oid       |           | not null | 
 lanacl        | aclitem[] |           |          | 
Indexes:
    "pg_language_name_index" UNIQUE, btree (lanname)
    "pg_language_oid_index" UNIQUE, btree (oid)
    

文档: pg_language

pg_language (PostgreSQL 10)

               Table "pg_catalog.pg_language"
    Column     |   Type    | Collation | Nullable | Default 
---------------+-----------+-----------+----------+---------
 lanname       | name      |           | not null | 
 lanowner      | oid       |           | not null | 
 lanispl       | boolean   |           | not null | 
 lanpltrusted  | boolean   |           | not null | 
 lanplcallfoid | oid       |           | not null | 
 laninline     | oid       |           | not null | 
 lanvalidator  | oid       |           | not null | 
 lanacl        | aclitem[] |           |          | 
Indexes:
    "pg_language_name_index" UNIQUE, btree (lanname)
    "pg_language_oid_index" UNIQUE, btree (oid)
    

文档: pg_language

pg_language (PostgreSQL 9.6)

    Table "pg_catalog.pg_language"
    Column     |   Type    | Modifiers 
---------------+-----------+-----------
 lanname       | name      | not null
 lanowner      | oid       | not null
 lanispl       | boolean   | not null
 lanpltrusted  | boolean   | not null
 lanplcallfoid | oid       | not null
 laninline     | oid       | not null
 lanvalidator  | oid       | not null
 lanacl        | aclitem[] | 
Indexes:
    "pg_language_name_index" UNIQUE, btree (lanname)
    "pg_language_oid_index" UNIQUE, btree (oid)
    

文档: pg_language

pg_language (PostgreSQL 9.5)

    Table "pg_catalog.pg_language"
    Column     |   Type    | Modifiers 
---------------+-----------+-----------
 lanname       | name      | not null
 lanowner      | oid       | not null
 lanispl       | boolean   | not null
 lanpltrusted  | boolean   | not null
 lanplcallfoid | oid       | not null
 laninline     | oid       | not null
 lanvalidator  | oid       | not null
 lanacl        | aclitem[] | 
Indexes:
    "pg_language_name_index" UNIQUE, btree (lanname)
    "pg_language_oid_index" UNIQUE, btree (oid)
    

文档: pg_language

pg_language (PostgreSQL 9.4)

    Table "pg_catalog.pg_language"
    Column     |   Type    | Modifiers 
---------------+-----------+-----------
 lanname       | name      | not null
 lanowner      | oid       | not null
 lanispl       | boolean   | not null
 lanpltrusted  | boolean   | not null
 lanplcallfoid | oid       | not null
 laninline     | oid       | not null
 lanvalidator  | oid       | not null
 lanacl        | aclitem[] | 
Indexes:
    "pg_language_name_index" UNIQUE, btree (lanname)
    "pg_language_oid_index" UNIQUE, btree (oid)
    

文档: pg_language

pg_language (PostgreSQL 9.3)

    Table "pg_catalog.pg_language"
    Column     |   Type    | Modifiers 
---------------+-----------+-----------
 lanname       | name      | not null
 lanowner      | oid       | not null
 lanispl       | boolean   | not null
 lanpltrusted  | boolean   | not null
 lanplcallfoid | oid       | not null
 laninline     | oid       | not null
 lanvalidator  | oid       | not null
 lanacl        | aclitem[] | 
Indexes:
    "pg_language_name_index" UNIQUE, btree (lanname)
    "pg_language_oid_index" UNIQUE, btree (oid)
    

文档: pg_language

pg_language (PostgreSQL 9.2)

    Table "pg_catalog.pg_language"
    Column     |   Type    | Modifiers 
---------------+-----------+-----------
 lanname       | name      | not null
 lanowner      | oid       | not null
 lanispl       | boolean   | not null
 lanpltrusted  | boolean   | not null
 lanplcallfoid | oid       | not null
 laninline     | oid       | not null
 lanvalidator  | oid       | not null
 lanacl        | aclitem[] | 
Indexes:
    "pg_language_name_index" UNIQUE, btree (lanname)
    "pg_language_oid_index" UNIQUE, btree (oid)
    

文档: pg_language

pg_language (PostgreSQL 9.1)

    Table "pg_catalog.pg_language"
    Column     |   Type    | Modifiers 
---------------+-----------+-----------
 lanname       | name      | not null
 lanowner      | oid       | not null
 lanispl       | boolean   | not null
 lanpltrusted  | boolean   | not null
 lanplcallfoid | oid       | not null
 laninline     | oid       | not null
 lanvalidator  | oid       | not null
 lanacl        | aclitem[] | 
Indexes:
    "pg_language_name_index" UNIQUE, btree (lanname)
    "pg_language_oid_index" UNIQUE, btree (oid)
    

文档: pg_language

pg_language (PostgreSQL 9.0)

    Table "pg_catalog.pg_language"
    Column     |   Type    | Modifiers 
---------------+-----------+-----------
 lanname       | name      | not null
 lanowner      | oid       | not null
 lanispl       | boolean   | not null
 lanpltrusted  | boolean   | not null
 lanplcallfoid | oid       | not null
 laninline     | oid       | not null
 lanvalidator  | oid       | not null
 lanacl        | aclitem[] | 
Indexes:
    "pg_language_name_index" UNIQUE, btree (lanname)
    "pg_language_oid_index" UNIQUE, btree (oid)
    

文档: pg_language

pg_language (PostgreSQL 8.4)

    Table "pg_catalog.pg_language"
    Column     |   Type    | Modifiers 
---------------+-----------+-----------
 lanname       | name      | not null
 lanowner      | oid       | not null
 lanispl       | boolean   | not null
 lanpltrusted  | boolean   | not null
 lanplcallfoid | oid       | not null
 lanvalidator  | oid       | not null
 lanacl        | aclitem[] | 
Indexes:
    "pg_language_name_index" UNIQUE, btree (lanname)
    "pg_language_oid_index" UNIQUE, btree (oid)
    

文档: pg_language

pg_language (PostgreSQL 8.3)

    Table "pg_catalog.pg_language"
    Column     |   Type    | Modifiers 
---------------+-----------+-----------
 lanname       | name      | not null
 lanowner      | oid       | not null
 lanispl       | boolean   | not null
 lanpltrusted  | boolean   | not null
 lanplcallfoid | oid       | not null
 lanvalidator  | oid       | not null
 lanacl        | aclitem[] | 
Indexes:
    "pg_language_name_index" UNIQUE, btree (lanname)
    "pg_language_oid_index" UNIQUE, btree (oid)
    

文档: pg_language

pg_language (PostgreSQL 8.2)

    Table "pg_catalog.pg_language"
    Column     |   Type    | Modifiers 
---------------+-----------+-----------
 lanname       | name      | not null
 lanispl       | boolean   | not null
 lanpltrusted  | boolean   | not null
 lanplcallfoid | oid       | not null
 lanvalidator  | oid       | not null
 lanacl        | aclitem[] | 
Indexes:
    "pg_language_name_index" UNIQUE, btree (lanname)
    "pg_language_oid_index" UNIQUE, btree (oid)
    

文档: pg_language

更改历史记录

示例

在没有安装其他语言的安装中,此表的默认内容将如下所示

postgres=# SELECT * FROM pg_language;
 lanname  | lanowner | lanispl | lanpltrusted | lanplcallfoid | laninline | lanvalidator | lanacl
----------+----------+---------+--------------+---------------+-----------+--------------+--------
 internal |       10 | f       | f            |             0 |         0 |         2246 |
 c        |       10 | f       | f            |             0 |         0 |         2247 |
 sql      |       10 | f       | t            |             0 |         0 |         2248 |
 plpgsql  |       10 | t       | t            |         12617 |     12618 |        12619 |
(4 rows)

postgres=# \dL
                      List of languages
  Name   |  Owner   | Trusted |         Description          
---------+----------+---------+------------------------------
 plpgsql | postgres | t       | PL/pgSQL procedural language
(1 row)

分类

过程语言系统目录

另请参阅

CREATE LANGUAGEpg_pltemplate

反馈

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