Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4c8a1b4

Browse files
committed
Fix uninitialized variable in transformTableLikeClause()
process_notnull_constraints should be set to false until we discover a NOT NULL column. Discovered while running Valgrind. Discussion: https://postgr.es/m/CAApHDvoMyiZVi1KW5WVdqMRzWsWkD3F7n6QD+BbAO6WTeAWsUQ@mail.gmail.com
1 parent 68a2a43 commit 4c8a1b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/parser/parse_utilcmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ transformTableLikeClause(CreateStmtContext *cxt, TableLikeClause *table_like_cla
10411041
AclResult aclresult;
10421042
char *comment;
10431043
ParseCallbackState pcbstate;
1044-
bool process_notnull_constraints;
1044+
bool process_notnull_constraints = false;
10451045

10461046
setup_parser_errposition_callback(&pcbstate, cxt->pstate,
10471047
table_like_clause->relation->location);

0 commit comments

Comments
 (0)