aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_utilcmd.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2023-04-11 23:01:12 +1200
committerDavid Rowley <drowley@postgresql.org>2023-04-11 23:01:12 +1200
commit4c8a1b4769372037b28516e5c9acb39bb82fa92d (patch)
treef6c66089063de4f022a57d32d415d2ed8570a848 /src/backend/parser/parse_utilcmd.c
parent68a2a437f46716efd54d177edf9dbcc9916c903b (diff)
downloadpostgresql-4c8a1b4769372037b28516e5c9acb39bb82fa92d.tar.gz
postgresql-4c8a1b4769372037b28516e5c9acb39bb82fa92d.zip
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
Diffstat (limited to 'src/backend/parser/parse_utilcmd.c')
-rw-r--r--src/backend/parser/parse_utilcmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index 15d8f3a1a0b..ea0fe6f8116 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -1041,7 +1041,7 @@ transformTableLikeClause(CreateStmtContext *cxt, TableLikeClause *table_like_cla
AclResult aclresult;
char *comment;
ParseCallbackState pcbstate;
- bool process_notnull_constraints;
+ bool process_notnull_constraints = false;
setup_parser_errposition_callback(&pcbstate, cxt->pstate,
table_like_clause->relation->location);