mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Rename pg_rowsecurity -> pg_policy and other fixes
As pointed out by Robert, we should really have named pg_rowsecurity pg_policy, as the objects stored in that catalog are policies. This patch fixes that and updates the column names to start with 'pol' to match the new catalog name. The security consideration for COPY with row level security, also pointed out by Robert, has also been addressed by remembering and re-checking the OID of the relation initially referenced during COPY processing, to make sure it hasn't changed under us by the time we finish planning out the query which has been built. Robert and Alvaro also commented on missing OCLASS and OBJECT entries for POLICY (formerly ROWSECURITY or POLICY, depending) in various places. This patch fixes that too, which also happens to add the ability to COMMENT on policies. In passing, attempt to improve the consistency of messages, comments, and documentation as well. This removes various incarnations of 'row-security', 'row-level security', 'Row-security', etc, in favor of 'policy', 'row level security' or 'row_security' as appropriate. Happy Thanksgiving!
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
|
||||
typedef struct RowSecurityPolicy
|
||||
{
|
||||
Oid rsecid; /* OID of the policy */
|
||||
Oid policy_id; /* OID of the policy */
|
||||
char *policy_name; /* Name of the policy */
|
||||
char cmd; /* Type of command policy is for */
|
||||
ArrayType *roles; /* Array of roles policy is for */
|
||||
@@ -30,8 +30,8 @@ typedef struct RowSecurityPolicy
|
||||
|
||||
typedef struct RowSecurityDesc
|
||||
{
|
||||
MemoryContext rscxt; /* row-security memory context */
|
||||
List *policies; /* list of row-security policies */
|
||||
MemoryContext rscxt; /* row security memory context */
|
||||
List *policies; /* list of row security policies */
|
||||
} RowSecurityDesc;
|
||||
|
||||
/* GUC variable */
|
||||
|
Reference in New Issue
Block a user