Skip to content

Commit 88b0a31

Browse files
committed
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
1 parent 8bbc618 commit 88b0a31

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/include/catalog/pg_subscription.h

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,17 @@ CATALOG(pg_subscription,6100) BKI_SHARED_RELATION BKI_ROWTYPE_OID(6101) BKI_SCHE
4141
* (the worker should be running) */
4242

4343
#ifdef CATALOG_VARLEN /* variable-length fields start here */
44-
text subconninfo; /* Connection string to the publisher */
45-
NameData subslotname; /* Slot name on publisher */
46-
text subsynccommit; /* Synchronous commit setting for worker */
47-
text subpublications[1]; /* List of publications subscribed to */
44+
/* Connection string to the publisher */
45+
text subconninfo BKI_FORCE_NOT_NULL;
46+
47+
/* Slot name on publisher */
48+
NameData subslotname BKI_FORCE_NOT_NULL;
49+
50+
/* Synchronous commit setting for worker */
51+
text subsynccommit BKI_FORCE_NOT_NULL;
52+
53+
/* List of publications subscribed to */
54+
text subpublications[1] BKI_FORCE_NOT_NULL;
4855
#endif
4956
} FormData_pg_subscription;
5057

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy