diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2018-03-06 13:17:13 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2018-03-06 13:20:40 -0300 |
commit | 1ffb63a2a1767c3dd0c7611bed6383bd37bfbce6 (patch) | |
tree | d78d3ede9276ad7b5253dd2308c0c8d93ad51ea8 /src/backend/parser/parse_utilcmd.c | |
parent | 4c831aeaa7bd837c5462df0bf54dc69d3683237a (diff) |
Fix bogus Name assignment in CreateStatistics
Apparently, it doesn't work to use a plain cstring as a Name datum: you
may end up having random bytes because of failing to zero the bytes
after the terminating \0, as indicated by valgrind. I introduced this
bug in 5564c1181548, so backpatch this fix to REL_10_STABLE, like that
commit.
While at it, fix a slightly misleading comment, pointed out by David
Rowley.
Diffstat (limited to 'src/backend/parser/parse_utilcmd.c')
-rw-r--r-- | src/backend/parser/parse_utilcmd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 8c7bd686397..0fd14f43c6b 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -2250,7 +2250,8 @@ transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt) * transformExtendedStatistics * Handle extended statistic objects * - * Right now, there's nothing to do here, so we just copy the list. + * Right now, there's nothing to do here, so we just append the list to + * the existing "after" list. */ static void transformExtendedStatistics(CreateStmtContext *cxt) |