I inserted the second one by mistake in commit 
14e87ffa5c54.
Reported-by: jian he <[email protected]>
Confirmed-by: Ashutosh Bapat <[email protected]>
Discussion: https://postgr.es/m/CACJufxFqckBFxPfCixHHbOr0zMLksviTj2m3o12-tErfx_PvTg@mail.gmail.com
                                              tbinfo->attrdefs[j]->adef_expr);
                    }
 
-                   print_notnull = (tbinfo->notnull_constrs[j] != NULL &&
-                                    (tbinfo->notnull_islocal[j] ||
-                                     dopt->binary_upgrade ||
-                                     tbinfo->ispartition));
-
                    if (print_notnull)
                    {
                        if (tbinfo->notnull_constrs[j][0] == '\0')