Fix bogus Name assignment in CreateStatistics

Alvaro Herrera <alvherre@alvh.no-ip.org>

Commit: 1ffb63a2a1767c3dd0c7611bed6383bd37bfbce6
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2018-03-06T16:20:40Z
Releases: 11.0
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.

Files

PathChange+/−
src/backend/commands/statscmds.c modified +5 −2
src/backend/parser/parse_utilcmd.c modified +2 −1