Commit 88b0a319 authored by Fujii Masao's avatar Fujii Masao

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
parent 8bbc618b
...@@ -41,10 +41,17 @@ CATALOG(pg_subscription,6100) BKI_SHARED_RELATION BKI_ROWTYPE_OID(6101) BKI_SCHE ...@@ -41,10 +41,17 @@ CATALOG(pg_subscription,6100) BKI_SHARED_RELATION BKI_ROWTYPE_OID(6101) BKI_SCHE
* (the worker should be running) */ * (the worker should be running) */
#ifdef CATALOG_VARLEN /* variable-length fields start here */ #ifdef CATALOG_VARLEN /* variable-length fields start here */
text subconninfo; /* Connection string to the publisher */ /* Connection string to the publisher */
NameData subslotname; /* Slot name on publisher */ text subconninfo BKI_FORCE_NOT_NULL;
text subsynccommit; /* Synchronous commit setting for worker */
text subpublications[1]; /* List of publications subscribed to */ /* 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 #endif
} FormData_pg_subscription; } FormData_pg_subscription;
......
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