Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit82a532b

Browse files
committed
Force some system catalog table columns to be marked NOT NULL.
In a manual pass over the catalog declaration I found a number ofcolumns which the boostrap automatism didn't mark NOT NULL even thoughthey actually were. Add BKI_FORCE_NOT_NULL markings to them.It's usually not critical if a system table column is falsely determinedto be nullable as the code should always catch relevant cases. But it'sgood to have a extra layer in place.Discussion: 20150215170014.GE15326@awork2.anarazel.de
1 parenteb68379 commit82a532b

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

‎src/include/catalog/pg_description.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ CATALOG(pg_description,2609) BKI_WITHOUT_OIDS
5252
int32objsubid;/* column number, or 0 if not used */
5353

5454
#ifdefCATALOG_VARLEN/* variable-length fields start here */
55-
textdescription;/* description of object */
55+
textdescriptionBKI_FORCE_NOT_NULL;/* description of object */
5656
#endif
5757
}FormData_pg_description;
5858

‎src/include/catalog/pg_extension.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ CATALOG(pg_extension,3079)
3636
boolextrelocatable;/* if true, allow ALTER EXTENSION SET SCHEMA */
3737

3838
#ifdefCATALOG_VARLEN/* variable-length fields start here */
39-
/* extversionshould never be null, but the others can be. */
40-
textextversion;/* extension version name */
39+
/* extversionmay never be null, but the others can be. */
40+
textextversionBKI_FORCE_NOT_NULL;/* extension version name */
4141
Oidextconfig[1];/* dumpable configuration tables */
4242
textextcondition[1];/* WHERE clauses for config tables */
4343
#endif

‎src/include/catalog/pg_largeobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ CATALOG(pg_largeobject,2613) BKI_WITHOUT_OIDS
3434
int32pageno;/* Page number (starting from 0) */
3535

3636
/* data has variable length, but we allow direct access; see inv_api.c */
37-
byteadata;/* Data for page (may be zero-length) */
37+
byteadataBKI_FORCE_NOT_NULL;/* Data for page (may be zero-length) */
3838
}FormData_pg_largeobject;
3939

4040
/* ----------------

‎src/include/catalog/pg_pltemplate.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ CATALOG(pg_pltemplate,1136) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
3535
booltmpldbacreate;/* PL is installable by db owner? */
3636

3737
#ifdefCATALOG_VARLEN/* variable-length fields start here */
38-
texttmplhandler;/* name of call handler function */
38+
texttmplhandlerBKI_FORCE_NOT_NULL;/* name of call handler function */
3939
texttmplinline;/* name of anonymous-block handler, or NULL */
4040
texttmplvalidator;/* name of validator function, or NULL */
41-
texttmpllibrary;/* path of shared library */
41+
texttmpllibraryBKI_FORCE_NOT_NULL;/* path of shared library */
4242
aclitemtmplacl[1];/* access privileges for template */
4343
#endif
4444
}FormData_pg_pltemplate;

‎src/include/catalog/pg_proc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ CATALOG(pg_proc,1255) BKI_BOOTSTRAP BKI_ROWTYPE_OID(81) BKI_SCHEMA_MACRO
6666
textproargnames[1]; /* parameter names (NULL if no names) */
6767
pg_node_tree proargdefaults;/* list of expression trees for argument
6868
* defaults (NULL if none) */
69-
textprosrc;/* procedure source text */
69+
textprosrc BKI_FORCE_NOT_NULL;/* procedure source text */
7070
textprobin;/* secondary procedure info (can be NULL) */
7171
textproconfig[1];/* procedure-local GUC settings */
7272
aclitemproacl[1];/* access permissions */

‎src/include/catalog/pg_seclabel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ CATALOG(pg_seclabel,3596) BKI_WITHOUT_OIDS
2727
int32objsubid;/* column number, or 0 if not used */
2828

2929
#ifdefCATALOG_VARLEN/* variable-length fields start here */
30-
textprovider;/* name of label provider */
31-
textlabel;/* security label of the object */
30+
textproviderBKI_FORCE_NOT_NULL;/* name of label provider */
31+
textlabelBKI_FORCE_NOT_NULL;/* security label of the object */
3232
#endif
3333
}FormData_pg_seclabel;
3434

‎src/include/catalog/pg_shdescription.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ CATALOG(pg_shdescription,2396) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
4444
Oidclassoid;/* OID of table containing object */
4545

4646
#ifdefCATALOG_VARLEN/* variable-length fields start here */
47-
textdescription;/* description of object */
47+
textdescriptionBKI_FORCE_NOT_NULL;/* description of object */
4848
#endif
4949
}FormData_pg_shdescription;
5050

‎src/include/catalog/pg_shseclabel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ CATALOG(pg_shseclabel,3592) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
2626
Oidclassoid;/* OID of table containing the shared object */
2727

2828
#ifdefCATALOG_VARLEN/* variable-length fields start here */
29-
textprovider;/* name of label provider */
30-
textlabel;/* security label of the object */
29+
textproviderBKI_FORCE_NOT_NULL;/* name of label provider */
30+
textlabelBKI_FORCE_NOT_NULL;/* security label of the object */
3131
#endif
3232
}FormData_pg_shseclabel;
3333

‎src/include/catalog/pg_trigger.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ CATALOG(pg_trigger,2620)
5757
int2vectortgattr;/* column numbers, if trigger is on columns */
5858

5959
#ifdefCATALOG_VARLEN
60-
byteatgargs;/* first\000second\000tgnargs\000 */
60+
byteatgargsBKI_FORCE_NOT_NULL;/* first\000second\000tgnargs\000 */
6161
pg_node_treetgqual;/* WHEN expression, or NULL if none */
6262
#endif
6363
}FormData_pg_trigger;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp