diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/catalog/catversion.h | 2 | ||||
-rw-r--r-- | src/include/catalog/dependency.h | 2 | ||||
-rw-r--r-- | src/include/catalog/indexing.h | 8 | ||||
-rw-r--r-- | src/include/catalog/pg_class.h | 2 | ||||
-rw-r--r-- | src/include/catalog/pg_policy.h | 53 | ||||
-rw-r--r-- | src/include/catalog/pg_rowsecurity.h | 53 | ||||
-rw-r--r-- | src/include/nodes/parsenodes.h | 2 | ||||
-rw-r--r-- | src/include/nodes/plannodes.h | 2 | ||||
-rw-r--r-- | src/include/nodes/relation.h | 2 | ||||
-rw-r--r-- | src/include/rewrite/rowsecurity.h | 6 | ||||
-rw-r--r-- | src/include/utils/plancache.h | 4 | ||||
-rw-r--r-- | src/include/utils/rel.h | 2 |
12 files changed, 69 insertions, 69 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index b670902b7d2..a9290886252 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 201411251 +#define CATALOG_VERSION_NO 201411271 #endif diff --git a/src/include/catalog/dependency.h b/src/include/catalog/dependency.h index 6a4913a66e5..87ac9240ae9 100644 --- a/src/include/catalog/dependency.h +++ b/src/include/catalog/dependency.h @@ -147,7 +147,7 @@ typedef enum ObjectClass OCLASS_DEFACL, /* pg_default_acl */ OCLASS_EXTENSION, /* pg_extension */ OCLASS_EVENT_TRIGGER, /* pg_event_trigger */ - OCLASS_ROWSECURITY, /* pg_rowsecurity */ + OCLASS_POLICY, /* pg_policy */ MAX_OCLASS /* MUST BE LAST */ } ObjectClass; diff --git a/src/include/catalog/indexing.h b/src/include/catalog/indexing.h index 870692cf54f..bde1a848fee 100644 --- a/src/include/catalog/indexing.h +++ b/src/include/catalog/indexing.h @@ -299,11 +299,11 @@ DECLARE_UNIQUE_INDEX(pg_extension_name_index, 3081, on pg_extension using btree( DECLARE_UNIQUE_INDEX(pg_range_rngtypid_index, 3542, on pg_range using btree(rngtypid oid_ops)); #define RangeTypidIndexId 3542 -DECLARE_UNIQUE_INDEX(pg_rowsecurity_oid_index, 3257, on pg_rowsecurity using btree(oid oid_ops)); -#define RowSecurityOidIndexId 3257 +DECLARE_UNIQUE_INDEX(pg_policy_oid_index, 3257, on pg_policy using btree(oid oid_ops)); +#define PolicyOidIndexId 3257 -DECLARE_UNIQUE_INDEX(pg_rowsecurity_polname_relid_index, 3258, on pg_rowsecurity using btree(rsecrelid oid_ops, rsecpolname name_ops)); -#define RowSecurityRelidPolnameIndexId 3258 +DECLARE_UNIQUE_INDEX(pg_policy_polrelid_polname_index, 3258, on pg_policy using btree(polrelid oid_ops, polname name_ops)); +#define PolicyPolrelidPolnameIndexId 3258 /* last step of initialization script: build the indexes declared above */ BUILD_INDICES diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h index 22c55a94903..1054cd0500b 100644 --- a/src/include/catalog/pg_class.h +++ b/src/include/catalog/pg_class.h @@ -65,7 +65,7 @@ CATALOG(pg_class,1259) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83) BKI_SCHEMA_MACRO bool relhasrules; /* has (or has had) any rules */ bool relhastriggers; /* has (or has had) any TRIGGERs */ bool relhassubclass; /* has (or has had) derived classes */ - bool relrowsecurity; /* row-security is enabled or not */ + bool relrowsecurity; /* row security is enabled or not */ bool relispopulated; /* matview currently holds query results */ char relreplident; /* see REPLICA_IDENTITY_xxx constants */ TransactionId relfrozenxid; /* all Xids < this are frozen in this rel */ diff --git a/src/include/catalog/pg_policy.h b/src/include/catalog/pg_policy.h new file mode 100644 index 00000000000..5d377a48389 --- /dev/null +++ b/src/include/catalog/pg_policy.h @@ -0,0 +1,53 @@ +/* + * pg_policy.h + * definition of the system "policy" relation (pg_policy) + * + * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + */ +#ifndef PG_POLICY_H +#define PG_POLICY_H + +#include "catalog/genbki.h" + +/* ---------------- + * pg_policy definition. cpp turns this into + * typedef struct FormData_pg_policy + * ---------------- + */ +#define PolicyRelationId 3256 + +CATALOG(pg_policy,3256) +{ + NameData polname; /* Policy name. */ + Oid polrelid; /* Oid of the relation with policy. */ + char polcmd; /* One of ACL_*_CHR, or \0 for all */ + +#ifdef CATALOG_VARLEN + Oid polroles[1] /* Roles associated with policy, not-NULL */ + pg_node_tree polqual; /* Policy quals. */ + pg_node_tree polwithcheck; /* WITH CHECK quals. */ +#endif +} FormData_pg_policy; + +/* ---------------- + * Form_pg_policy corresponds to a pointer to a row with + * the format of pg_policy relation. + * ---------------- + */ +typedef FormData_pg_policy *Form_pg_policy; + +/* ---------------- + * compiler constants for pg_policy + * ---------------- + */ +#define Natts_pg_policy 6 +#define Anum_pg_policy_polname 1 +#define Anum_pg_policy_polrelid 2 +#define Anum_pg_policy_polcmd 3 +#define Anum_pg_policy_polroles 4 +#define Anum_pg_policy_polqual 5 +#define Anum_pg_policy_polwithcheck 6 + +#endif /* PG_POLICY_H */ diff --git a/src/include/catalog/pg_rowsecurity.h b/src/include/catalog/pg_rowsecurity.h deleted file mode 100644 index 2638d5e6848..00000000000 --- a/src/include/catalog/pg_rowsecurity.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * pg_rowsecurity.h - * definition of the system catalog for row-security policy (pg_rowsecurity) - * - * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group - * Portions Copyright (c) 1994, Regents of the University of California - * - */ -#ifndef PG_ROWSECURITY_H -#define PG_ROWSECURITY_H - -#include "catalog/genbki.h" - -/* ---------------- - * pg_rowsecurity definition. cpp turns this into - * typedef struct FormData_pg_rowsecurity - * ---------------- - */ -#define RowSecurityRelationId 3256 - -CATALOG(pg_rowsecurity,3256) -{ - NameData rsecpolname; /* Policy name. */ - Oid rsecrelid; /* Oid of the relation with policy. */ - char rseccmd; /* One of ACL_*_CHR, or \0 for all */ - -#ifdef CATALOG_VARLEN - Oid rsecroles[1] /* Roles associated with policy, not-NULL */ - pg_node_tree rsecqual; /* Policy quals. */ - pg_node_tree rsecwithcheck; /* WITH CHECK quals. */ -#endif -} FormData_pg_rowsecurity; - -/* ---------------- - * Form_pg_rowsecurity corresponds to a pointer to a row with - * the format of pg_rowsecurity relation. - * ---------------- - */ -typedef FormData_pg_rowsecurity *Form_pg_rowsecurity; - -/* ---------------- - * compiler constants for pg_rowsecurity - * ---------------- - */ -#define Natts_pg_rowsecurity 6 -#define Anum_pg_rowsecurity_rsecpolname 1 -#define Anum_pg_rowsecurity_rsecrelid 2 -#define Anum_pg_rowsecurity_rseccmd 3 -#define Anum_pg_rowsecurity_rsecroles 4 -#define Anum_pg_rowsecurity_rsecqual 5 -#define Anum_pg_rowsecurity_rsecwithcheck 6 - -#endif /* PG_ROWSECURITY_H */ diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 3e4f815852d..255415d93a3 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -121,7 +121,7 @@ typedef struct Query bool hasRecursive; /* WITH RECURSIVE was specified */ bool hasModifyingCTE; /* has INSERT/UPDATE/DELETE in WITH */ bool hasForUpdate; /* FOR [KEY] UPDATE/SHARE was specified */ - bool hasRowSecurity; /* Row-security policy is applied */ + bool hasRowSecurity; /* row security applied? */ List *cteList; /* WITH list (of CommonTableExpr's) */ diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h index 7f9eaf0df26..48203a0d21f 100644 --- a/src/include/nodes/plannodes.h +++ b/src/include/nodes/plannodes.h @@ -70,7 +70,7 @@ typedef struct PlannedStmt int nParamExec; /* number of PARAM_EXEC Params used */ - bool has_rls; /* row-security applied? */ + bool hasRowSecurity; /* row security applied? */ } PlannedStmt; diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index 810b9c8893b..711649687ae 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -101,7 +101,7 @@ typedef struct PlannerGlobal bool transientPlan; /* redo plan when TransactionXmin changes? */ - bool has_rls; /* row-security is applied? */ + bool hasRowSecurity; /* row security applied? */ } PlannerGlobal; diff --git a/src/include/rewrite/rowsecurity.h b/src/include/rewrite/rowsecurity.h index 8b4d5c0918f..4144b25fec7 100644 --- a/src/include/rewrite/rowsecurity.h +++ b/src/include/rewrite/rowsecurity.h @@ -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 */ diff --git a/src/include/utils/plancache.h b/src/include/utils/plancache.h index 2622ceb54bc..9e1c0000aab 100644 --- a/src/include/utils/plancache.h +++ b/src/include/utils/plancache.h @@ -109,9 +109,9 @@ typedef struct CachedPlanSource double generic_cost; /* cost of generic plan, or -1 if not known */ double total_custom_cost; /* total cost of custom plans so far */ int num_custom_plans; /* number of plans included in total */ - bool has_rls; /* planned with row-security? */ + bool hasRowSecurity; /* planned with row security? */ int row_security_env; /* row security setting when planned */ - bool rowSecurityDisabled; /* is row-security disabled? */ + bool rowSecurityDisabled; /* is row security disabled? */ } CachedPlanSource; /* diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index 01a9ef32ebf..48ebf594943 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -106,7 +106,7 @@ typedef struct RelationData MemoryContext rd_rulescxt; /* private memory cxt for rd_rules, if any */ TriggerDesc *trigdesc; /* Trigger info, or NULL if rel has none */ /* use "struct" here to avoid needing to include rowsecurity.h: */ - struct RowSecurityDesc *rd_rsdesc; /* Row-security policies, or NULL */ + struct RowSecurityDesc *rd_rsdesc; /* row security policies, or NULL */ /* data managed by RelationGetIndexList: */ List *rd_indexlist; /* list of OIDs of indexes on relation */ |