Skip to content

Commit 9b39b79

Browse files
committed
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).
1 parent a556549 commit 9b39b79

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/* yyyymmddN */
56-
#define CATALOG_VERSION_NO 201807191
56+
#define CATALOG_VERSION_NO 201808271
5757

5858
#endif

src/include/catalog/pg_attrdef.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ CATALOG(pg_attrdef,2604,AttrDefaultRelationId)
3232
int16 adnum; /* attnum of attribute */
3333

3434
#ifdef CATALOG_VARLEN /* variable-length fields start here */
35-
pg_node_tree adbin; /* nodeToString representation of default */
36-
text adsrc; /* human-readable representation of default */
35+
pg_node_tree adbin BKI_FORCE_NOT_NULL; /* nodeToString representation of default */
36+
text adsrc BKI_FORCE_NOT_NULL; /* human-readable representation of default */
3737
#endif
3838
} FormData_pg_attrdef;
3939

src/include/catalog/pg_default_acl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ CATALOG(pg_default_acl,826,DefaultAclRelationId)
3434
char defaclobjtype; /* see DEFACLOBJ_xxx constants below */
3535

3636
#ifdef CATALOG_VARLEN /* variable-length fields start here */
37-
aclitem defaclacl[1]; /* permissions to add at CREATE time */
37+
aclitem defaclacl[1] BKI_FORCE_NOT_NULL; /* permissions to add at CREATE time */
3838
#endif
3939
} FormData_pg_default_acl;
4040

src/include/catalog/pg_policy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ CATALOG(pg_policy,3256,PolicyRelationId)
3434
bool polpermissive; /* restrictive or permissive policy */
3535

3636
#ifdef CATALOG_VARLEN
37-
Oid polroles[1]; /* Roles associated with policy, not-NULL */
37+
Oid polroles[1] BKI_FORCE_NOT_NULL; /* Roles associated with policy */
3838
pg_node_tree polqual; /* Policy quals. */
3939
pg_node_tree polwithcheck; /* WITH CHECK quals. */
4040
#endif

src/include/catalog/pg_rewrite.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ CATALOG(pg_rewrite,2618,RewriteRelationId)
3838
bool is_instead;
3939

4040
#ifdef CATALOG_VARLEN /* variable-length fields start here */
41-
pg_node_tree ev_qual;
42-
pg_node_tree ev_action;
41+
pg_node_tree ev_qual BKI_FORCE_NOT_NULL;
42+
pg_node_tree ev_action BKI_FORCE_NOT_NULL;
4343
#endif
4444
} FormData_pg_rewrite;
4545

0 commit comments

Comments
 (0)