pg_policy

存储行级安全策略的系统表

pg_policy 是一个存储表行级安全 (RLS) 策略的系统目录表。

pg_policyPostgreSQL 9.5 中添加。

按 PostgreSQL 版本定义

pg_policy (PostgreSQL 17)

                 Table "pg_catalog.pg_policy"
    Column     |     Type     | Collation | Nullable | Default 
---------------+--------------+-----------+----------+---------
 oid           | oid          |           | not null | 
 polname       | name         |           | not null | 
 polrelid      | oid          |           | not null | 
 polcmd        | "char"       |           | not null | 
 polpermissive | boolean      |           | not null | 
 polroles      | oid[]        |           | not null | 
 polqual       | pg_node_tree | C         |          | 
 polwithcheck  | pg_node_tree | C         |          | 
Indexes:
    "pg_policy_oid_index" PRIMARY KEY, btree (oid)
    "pg_policy_polrelid_polname_index" UNIQUE CONSTRAINT, btree (polrelid, polname)
    

文档: pg_policy

pg_policy (PostgreSQL 16)

                 Table "pg_catalog.pg_policy"
    Column     |     Type     | Collation | Nullable | Default 
---------------+--------------+-----------+----------+---------
 oid           | oid          |           | not null | 
 polname       | name         |           | not null | 
 polrelid      | oid          |           | not null | 
 polcmd        | "char"       |           | not null | 
 polpermissive | boolean      |           | not null | 
 polroles      | oid[]        |           | not null | 
 polqual       | pg_node_tree | C         |          | 
 polwithcheck  | pg_node_tree | C         |          | 
Indexes:
    "pg_policy_oid_index" PRIMARY KEY, btree (oid)
    "pg_policy_polrelid_polname_index" UNIQUE CONSTRAINT, btree (polrelid, polname)
    

文档: pg_policy

pg_policy (PostgreSQL 15)

                 Table "pg_catalog.pg_policy"
    Column     |     Type     | Collation | Nullable | Default 
---------------+--------------+-----------+----------+---------
 oid           | oid          |           | not null | 
 polname       | name         |           | not null | 
 polrelid      | oid          |           | not null | 
 polcmd        | "char"       |           | not null | 
 polpermissive | boolean      |           | not null | 
 polroles      | oid[]        |           | not null | 
 polqual       | pg_node_tree | C         |          | 
 polwithcheck  | pg_node_tree | C         |          | 
Indexes:
    "pg_policy_oid_index" PRIMARY KEY, btree (oid)
    "pg_policy_polrelid_polname_index" UNIQUE CONSTRAINT, btree (polrelid, polname)
    

文档: pg_policy

pg_policy (PostgreSQL 14)

                 Table "pg_catalog.pg_policy"
    Column     |     Type     | Collation | Nullable | Default 
---------------+--------------+-----------+----------+---------
 oid           | oid          |           | not null | 
 polname       | name         |           | not null | 
 polrelid      | oid          |           | not null | 
 polcmd        | "char"       |           | not null | 
 polpermissive | boolean      |           | not null | 
 polroles      | oid[]        |           | not null | 
 polqual       | pg_node_tree | C         |          | 
 polwithcheck  | pg_node_tree | C         |          | 
Indexes:
    "pg_policy_oid_index" PRIMARY KEY, btree (oid)
    "pg_policy_polrelid_polname_index" UNIQUE CONSTRAINT, btree (polrelid, polname)
    

文档: pg_policy

pg_policy (PostgreSQL 13)

                 Table "pg_catalog.pg_policy"
    Column     |     Type     | Collation | Nullable | Default 
---------------+--------------+-----------+----------+---------
 oid           | oid          |           | not null | 
 polname       | name         |           | not null | 
 polrelid      | oid          |           | not null | 
 polcmd        | "char"       |           | not null | 
 polpermissive | boolean      |           | not null | 
 polroles      | oid[]        |           | not null | 
 polqual       | pg_node_tree | C         |          | 
 polwithcheck  | pg_node_tree | C         |          | 
Indexes:
    "pg_policy_oid_index" UNIQUE, btree (oid)
    "pg_policy_polrelid_polname_index" UNIQUE, btree (polrelid, polname)
    

文档: pg_policy

pg_policy (PostgreSQL 12)

                 Table "pg_catalog.pg_policy"
    Column     |     Type     | Collation | Nullable | Default 
---------------+--------------+-----------+----------+---------
 oid           | oid          |           | not null | 
 polname       | name         |           | not null | 
 polrelid      | oid          |           | not null | 
 polcmd        | "char"       |           | not null | 
 polpermissive | boolean      |           | not null | 
 polroles      | oid[]        |           | not null | 
 polqual       | pg_node_tree | C         |          | 
 polwithcheck  | pg_node_tree | C         |          | 
Indexes:
    "pg_policy_oid_index" UNIQUE, btree (oid)
    "pg_policy_polrelid_polname_index" UNIQUE, btree (polrelid, polname)
    

文档: pg_policy

pg_policy (PostgreSQL 11)

                 Table "pg_catalog.pg_policy"
    Column     |     Type     | Collation | Nullable | Default 
---------------+--------------+-----------+----------+---------
 polname       | name         |           | not null | 
 polrelid      | oid          |           | not null | 
 polcmd        | "char"       |           | not null | 
 polpermissive | boolean      |           | not null | 
 polroles      | oid[]        |           |          | 
 polqual       | pg_node_tree |           |          | 
 polwithcheck  | pg_node_tree |           |          | 
Indexes:
    "pg_policy_oid_index" UNIQUE, btree (oid)
    "pg_policy_polrelid_polname_index" UNIQUE, btree (polrelid, polname)
    

文档: pg_policy

pg_policy (PostgreSQL 10)

                 Table "pg_catalog.pg_policy"
    Column     |     Type     | Collation | Nullable | Default 
---------------+--------------+-----------+----------+---------
 polname       | name         |           | not null | 
 polrelid      | oid          |           | not null | 
 polcmd        | "char"       |           | not null | 
 polpermissive | boolean      |           | not null | 
 polroles      | oid[]        |           |          | 
 polqual       | pg_node_tree |           |          | 
 polwithcheck  | pg_node_tree |           |          | 
Indexes:
    "pg_policy_oid_index" UNIQUE, btree (oid)
    "pg_policy_polrelid_polname_index" UNIQUE, btree (polrelid, polname)
    

文档: pg_policy

pg_policy (PostgreSQL 9.6)

      Table "pg_catalog.pg_policy"
    Column    |     Type     | Modifiers 
--------------+--------------+-----------
 polname      | name         | not null
 polrelid     | oid          | not null
 polcmd       | "char"       | not null
 polroles     | oid[]        | 
 polqual      | pg_node_tree | 
 polwithcheck | pg_node_tree | 
Indexes:
    "pg_policy_oid_index" UNIQUE, btree (oid)
    "pg_policy_polrelid_polname_index" UNIQUE, btree (polrelid, polname)
    

文档: pg_policy

pg_policy (PostgreSQL 9.5)

      Table "pg_catalog.pg_policy"
    Column    |     Type     | Modifiers 
--------------+--------------+-----------
 polname      | name         | not null
 polrelid     | oid          | not null
 polcmd       | "char"       | not null
 polroles     | oid[]        | 
 polqual      | pg_node_tree | 
 polwithcheck | pg_node_tree | 
Indexes:
    "pg_policy_oid_index" UNIQUE, btree (oid)
    "pg_policy_polrelid_polname_index" UNIQUE, btree (polrelid, polname)
    

文档: pg_policy

更改历史记录

分类

安全系统目录

另请参阅

pg_policies,行级安全

反馈

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