pg_publication_namespace

包含模式和发布之间关系的系统表

pg_publication_namespace 是一个包含模式和发布之间映射的系统目录表。

pg_publication_namespace 添加于PostgreSQL 15

按 PostgreSQL 版本定义

pg_publication_namespace (PostgreSQL 17)

   Table "pg_catalog.pg_publication_namespace"
 Column  | Type | Collation | Nullable | Default 
---------+------+-----------+----------+---------
 oid     | oid  |           | not null | 
 pnpubid | oid  |           | not null | 
 pnnspid | oid  |           | not null | 
Indexes:
    "pg_publication_namespace_oid_index" PRIMARY KEY, btree (oid)
    "pg_publication_namespace_pnnspid_pnpubid_index" UNIQUE CONSTRAINT, btree (pnnspid, pnpubid)
    

文档: pg_publication_namespace

pg_publication_namespace (PostgreSQL 16)

   Table "pg_catalog.pg_publication_namespace"
 Column  | Type | Collation | Nullable | Default 
---------+------+-----------+----------+---------
 oid     | oid  |           | not null | 
 pnpubid | oid  |           | not null | 
 pnnspid | oid  |           | not null | 
Indexes:
    "pg_publication_namespace_oid_index" PRIMARY KEY, btree (oid)
    "pg_publication_namespace_pnnspid_pnpubid_index" UNIQUE CONSTRAINT, btree (pnnspid, pnpubid)
    

文档: pg_publication_namespace

pg_publication_namespace (PostgreSQL 15)

   Table "pg_catalog.pg_publication_namespace"
 Column  | Type | Collation | Nullable | Default 
---------+------+-----------+----------+---------
 oid     | oid  |           | not null | 
 pnpubid | oid  |           | not null | 
 pnnspid | oid  |           | not null | 
Indexes:
    "pg_publication_namespace_oid_index" PRIMARY KEY, btree (oid)
    "pg_publication_namespace_pnnspid_pnpubid_index" UNIQUE CONSTRAINT, btree (pnnspid, pnpubid)
    

文档: pg_publication_namespace

更改历史记录

示例

如果为模式创建发布,则将在pg_publication_namespace中创建将该模式与发布关联的条目。

postgres=# CREATE PUBLICATION foopub FOR ALL TABLES IN SCHEMA foo;
CREATE PUBLICATION

postgres=# SELECT * FROM pg_publication_namespace ;
  oid  | pnpubid | pnnspid 
-------+---------+---------
 16430 |   16429 |   16414
(1 row)

分类

逻辑复制系统目录

另请参阅

pg_publicationpg_publication_rel

反馈

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