summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFujii Masao <fujii@postgresql.org>2017-04-20 23:35:30 +0900
committerFujii Masao <fujii@postgresql.org>2017-04-20 23:35:30 +0900
commit88b0a31926331eb5336ec92010b3b4f7e6efb53c (patch)
treedbda79857aac3630048484ea208de96a966acc7d
parent8bbc618b4825b13a9776f2289acd06483e140300 (diff)
Mark some columns in pg_subscription as NOT NULL.
In pg_subscription, subconninfo, subslotname, subsynccommit and subpublications are expected not to be NULL. Therefore this patch adds BKI_FORCE_NOT_NULL markings to them. This patch is basically unnecessary unless the code has a bug which wrongly sets either of those columns to NULL. But it's good to have this as a safeguard. Author: Masahiko Sawada Reviewed-by: Kyotaro Horiguchi Reported-by: Fujii Masao Discussion: http://postgr.es/m/CAHGQGwFDWh_Qr-q_GEMpD+qH=vYPMdVqw=ZOSY3kX_Pna9R9SA@mail.gmail.com
-rw-r--r--src/include/catalog/pg_subscription.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/include/catalog/pg_subscription.h b/src/include/catalog/pg_subscription.h
index fae542b6129..5550f199267 100644
--- a/src/include/catalog/pg_subscription.h
+++ b/src/include/catalog/pg_subscription.h
@@ -41,10 +41,17 @@ CATALOG(pg_subscription,6100) BKI_SHARED_RELATION BKI_ROWTYPE_OID(6101) BKI_SCHE
* (the worker should be running) */
#ifdef CATALOG_VARLEN /* variable-length fields start here */
- text subconninfo; /* Connection string to the publisher */
- NameData subslotname; /* Slot name on publisher */
- text subsynccommit; /* Synchronous commit setting for worker */
- text subpublications[1]; /* List of publications subscribed to */
+ /* Connection string to the publisher */
+ text subconninfo BKI_FORCE_NOT_NULL;
+
+ /* Slot name on publisher */
+ NameData subslotname BKI_FORCE_NOT_NULL;
+
+ /* Synchronous commit setting for worker */
+ text subsynccommit BKI_FORCE_NOT_NULL;
+
+ /* List of publications subscribed to */
+ text subpublications[1] BKI_FORCE_NOT_NULL;
#endif
} FormData_pg_subscription;