Commit 9b39b799 authored by Peter Eisentraut's avatar Peter Eisentraut

Add some not null constraints to catalogs

Use BKI_FORCE_NOT_NULL on some catalog field declarations that are never
null (according to the source code that accesses them).
parent a556549d
...@@ -53,6 +53,6 @@ ...@@ -53,6 +53,6 @@
*/ */
/* yyyymmddN */ /* yyyymmddN */
#define CATALOG_VERSION_NO 201807191 #define CATALOG_VERSION_NO 201808271
#endif #endif
...@@ -32,8 +32,8 @@ CATALOG(pg_attrdef,2604,AttrDefaultRelationId) ...@@ -32,8 +32,8 @@ CATALOG(pg_attrdef,2604,AttrDefaultRelationId)
int16 adnum; /* attnum of attribute */ int16 adnum; /* attnum of attribute */
#ifdef CATALOG_VARLEN /* variable-length fields start here */ #ifdef CATALOG_VARLEN /* variable-length fields start here */
pg_node_tree adbin; /* nodeToString representation of default */ pg_node_tree adbin BKI_FORCE_NOT_NULL; /* nodeToString representation of default */
text adsrc; /* human-readable representation of default */ text adsrc BKI_FORCE_NOT_NULL; /* human-readable representation of default */
#endif #endif
} FormData_pg_attrdef; } FormData_pg_attrdef;
......
...@@ -34,7 +34,7 @@ CATALOG(pg_default_acl,826,DefaultAclRelationId) ...@@ -34,7 +34,7 @@ CATALOG(pg_default_acl,826,DefaultAclRelationId)
char defaclobjtype; /* see DEFACLOBJ_xxx constants below */ char defaclobjtype; /* see DEFACLOBJ_xxx constants below */
#ifdef CATALOG_VARLEN /* variable-length fields start here */ #ifdef CATALOG_VARLEN /* variable-length fields start here */
aclitem defaclacl[1]; /* permissions to add at CREATE time */ aclitem defaclacl[1] BKI_FORCE_NOT_NULL; /* permissions to add at CREATE time */
#endif #endif
} FormData_pg_default_acl; } FormData_pg_default_acl;
......
...@@ -34,7 +34,7 @@ CATALOG(pg_policy,3256,PolicyRelationId) ...@@ -34,7 +34,7 @@ CATALOG(pg_policy,3256,PolicyRelationId)
bool polpermissive; /* restrictive or permissive policy */ bool polpermissive; /* restrictive or permissive policy */
#ifdef CATALOG_VARLEN #ifdef CATALOG_VARLEN
Oid polroles[1]; /* Roles associated with policy, not-NULL */ Oid polroles[1] BKI_FORCE_NOT_NULL; /* Roles associated with policy */
pg_node_tree polqual; /* Policy quals. */ pg_node_tree polqual; /* Policy quals. */
pg_node_tree polwithcheck; /* WITH CHECK quals. */ pg_node_tree polwithcheck; /* WITH CHECK quals. */
#endif #endif
......
...@@ -38,8 +38,8 @@ CATALOG(pg_rewrite,2618,RewriteRelationId) ...@@ -38,8 +38,8 @@ CATALOG(pg_rewrite,2618,RewriteRelationId)
bool is_instead; bool is_instead;
#ifdef CATALOG_VARLEN /* variable-length fields start here */ #ifdef CATALOG_VARLEN /* variable-length fields start here */
pg_node_tree ev_qual; pg_node_tree ev_qual BKI_FORCE_NOT_NULL;
pg_node_tree ev_action; pg_node_tree ev_action BKI_FORCE_NOT_NULL;
#endif #endif
} FormData_pg_rewrite; } FormData_pg_rewrite;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment