PostgreSQL 版本定义
pg_namespace (PostgreSQL 17)
Table "pg_catalog.pg_namespace" Column | Type | Collation | Nullable | Default ----------+-----------+-----------+----------+--------- oid | oid | | not null | nspname | name | | not null | nspowner | oid | | not null | nspacl | aclitem[] | | | Indexes: "pg_namespace_oid_index" PRIMARY KEY, btree (oid) "pg_namespace_nspname_index" UNIQUE CONSTRAINT, btree (nspname)
文档: pg_namespace
pg_namespace (PostgreSQL 16)
Table "pg_catalog.pg_namespace" Column | Type | Collation | Nullable | Default ----------+-----------+-----------+----------+--------- oid | oid | | not null | nspname | name | | not null | nspowner | oid | | not null | nspacl | aclitem[] | | | Indexes: "pg_namespace_oid_index" PRIMARY KEY, btree (oid) "pg_namespace_nspname_index" UNIQUE CONSTRAINT, btree (nspname)
文档: pg_namespace
pg_namespace (PostgreSQL 15)
Table "pg_catalog.pg_namespace" Column | Type | Collation | Nullable | Default ----------+-----------+-----------+----------+--------- oid | oid | | not null | nspname | name | | not null | nspowner | oid | | not null | nspacl | aclitem[] | | | Indexes: "pg_namespace_oid_index" PRIMARY KEY, btree (oid) "pg_namespace_nspname_index" UNIQUE CONSTRAINT, btree (nspname)
文档: pg_namespace
pg_namespace (PostgreSQL 14)
Table "pg_catalog.pg_namespace" Column | Type | Collation | Nullable | Default ----------+-----------+-----------+----------+--------- oid | oid | | not null | nspname | name | | not null | nspowner | oid | | not null | nspacl | aclitem[] | | | Indexes: "pg_namespace_oid_index" PRIMARY KEY, btree (oid) "pg_namespace_nspname_index" UNIQUE CONSTRAINT, btree (nspname)
文档: pg_namespace
pg_namespace (PostgreSQL 13)
Table "pg_catalog.pg_namespace" Column | Type | Collation | Nullable | Default ----------+-----------+-----------+----------+--------- oid | oid | | not null | nspname | name | | not null | nspowner | oid | | not null | nspacl | aclitem[] | | | Indexes: "pg_namespace_nspname_index" UNIQUE, btree (nspname) "pg_namespace_oid_index" UNIQUE, btree (oid)
文档: pg_namespace
pg_namespace (PostgreSQL 12)
Table "pg_catalog.pg_namespace" Column | Type | Collation | Nullable | Default ----------+-----------+-----------+----------+--------- oid | oid | | not null | nspname | name | | not null | nspowner | oid | | not null | nspacl | aclitem[] | | | Indexes: "pg_namespace_nspname_index" UNIQUE, btree (nspname) "pg_namespace_oid_index" UNIQUE, btree (oid)
文档: pg_namespace
pg_namespace (PostgreSQL 11)
Table "pg_catalog.pg_namespace" Column | Type | Collation | Nullable | Default ----------+-----------+-----------+----------+--------- nspname | name | | not null | nspowner | oid | | not null | nspacl | aclitem[] | | | Indexes: "pg_namespace_nspname_index" UNIQUE, btree (nspname) "pg_namespace_oid_index" UNIQUE, btree (oid)
文档: pg_namespace
pg_namespace (PostgreSQL 10)
Table "pg_catalog.pg_namespace" Column | Type | Collation | Nullable | Default ----------+-----------+-----------+----------+--------- nspname | name | | not null | nspowner | oid | | not null | nspacl | aclitem[] | | | Indexes: "pg_namespace_nspname_index" UNIQUE, btree (nspname) "pg_namespace_oid_index" UNIQUE, btree (oid)
文档: pg_namespace
pg_namespace (PostgreSQL 9.6)
Table "pg_catalog.pg_namespace" Column | Type | Modifiers ----------+-----------+----------- nspname | name | not null nspowner | oid | not null nspacl | aclitem[] | Indexes: "pg_namespace_nspname_index" UNIQUE, btree (nspname) "pg_namespace_oid_index" UNIQUE, btree (oid)
文档: pg_namespace
pg_namespace (PostgreSQL 9.5)
Table "pg_catalog.pg_namespace" Column | Type | Modifiers ----------+-----------+----------- nspname | name | not null nspowner | oid | not null nspacl | aclitem[] | Indexes: "pg_namespace_nspname_index" UNIQUE, btree (nspname) "pg_namespace_oid_index" UNIQUE, btree (oid)
文档: pg_namespace
pg_namespace (PostgreSQL 9.4)
Table "pg_catalog.pg_namespace" Column | Type | Modifiers ----------+-----------+----------- nspname | name | not null nspowner | oid | not null nspacl | aclitem[] | Indexes: "pg_namespace_nspname_index" UNIQUE, btree (nspname) "pg_namespace_oid_index" UNIQUE, btree (oid)
文档: pg_namespace
pg_namespace (PostgreSQL 9.3)
Table "pg_catalog.pg_namespace" Column | Type | Modifiers ----------+-----------+----------- nspname | name | not null nspowner | oid | not null nspacl | aclitem[] | Indexes: "pg_namespace_nspname_index" UNIQUE, btree (nspname) "pg_namespace_oid_index" UNIQUE, btree (oid)
文档: pg_namespace
pg_namespace (PostgreSQL 9.2)
Table "pg_catalog.pg_namespace" Column | Type | Modifiers ----------+-----------+----------- nspname | name | not null nspowner | oid | not null nspacl | aclitem[] | Indexes: "pg_namespace_nspname_index" UNIQUE, btree (nspname) "pg_namespace_oid_index" UNIQUE, btree (oid)
文档: pg_namespace
pg_namespace (PostgreSQL 9.1)
Table "pg_catalog.pg_namespace" Column | Type | Modifiers ----------+-----------+----------- nspname | name | not null nspowner | oid | not null nspacl | aclitem[] | Indexes: "pg_namespace_nspname_index" UNIQUE, btree (nspname) "pg_namespace_oid_index" UNIQUE, btree (oid)
文档: pg_namespace
pg_namespace (PostgreSQL 9.0)
Table "pg_catalog.pg_namespace" Column | Type | Modifiers ----------+-----------+----------- nspname | name | not null nspowner | oid | not null nspacl | aclitem[] | Indexes: "pg_namespace_nspname_index" UNIQUE, btree (nspname) "pg_namespace_oid_index" UNIQUE, btree (oid)
文档: pg_namespace
pg_namespace (PostgreSQL 8.4)
Table "pg_catalog.pg_namespace" Column | Type | Modifiers ----------+-----------+----------- nspname | name | not null nspowner | oid | not null nspacl | aclitem[] | Indexes: "pg_namespace_nspname_index" UNIQUE, btree (nspname) "pg_namespace_oid_index" UNIQUE, btree (oid)
文档: pg_namespace
pg_namespace (PostgreSQL 8.3)
Table "pg_catalog.pg_namespace" Column | Type | Modifiers ----------+-----------+----------- nspname | name | not null nspowner | oid | not null nspacl | aclitem[] | Indexes: "pg_namespace_nspname_index" UNIQUE, btree (nspname) "pg_namespace_oid_index" UNIQUE, btree (oid)
文档: pg_namespace
pg_namespace (PostgreSQL 8.2)
Table "pg_catalog.pg_namespace" Column | Type | Modifiers ----------+-----------+----------- nspname | name | not null nspowner | oid | not null nspacl | aclitem[] | Indexes: "pg_namespace_nspname_index" UNIQUE, btree (nspname) "pg_namespace_oid_index" UNIQUE, btree (oid)
文档: pg_namespace
更改历史记录
自它在 PostgreSQL 7.3 中添加以来,此表未被修改。
- PostgreSQL 7.3
- (提交 a25b94c0)
例子
postgres=# CREATE SCHEMA someschema; CREATE SCHEMA
postgres=# \dn List of schemas Name | Owner ------------+---------- public | postgres someschema | postgres (2 rows) postgres=# SELECT * FROM pg_namespace; nspname | nspowner | nspacl --------------------+----------+------------------------------------- pg_toast | 10 | pg_temp_1 | 10 | pg_toast_temp_1 | 10 | pg_catalog | 10 | {postgres=UC/postgres,=U/postgres} public | 10 | {postgres=UC/postgres,=UC/postgres} information_schema | 10 | {postgres=UC/postgres,=U/postgres} someschema | 10 | (7 rows)
参考
- PostgreSQL 文档: pg_namespace