diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-07-31 11:33:46 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-07-31 11:33:46 -0400 |
commit | b4cc35fbb709bd6fcae8998f041fd731c9acbf42 (patch) | |
tree | 6156231828882029edda3172da6f02d83a3e440e /src/backend/access/spgist/spgvalidate.c | |
parent | d2a51e3efcbab5b288bbadba1a7dfa123a50ba5b (diff) | |
download | postgresql-b4cc35fbb709bd6fcae8998f041fd731c9acbf42.tar.gz postgresql-b4cc35fbb709bd6fcae8998f041fd731c9acbf42.zip |
Tighten coding for non-composite case in plperl's return_next.
Coverity complained about this code's practice of using scalar variables
as single-element arrays. While that's really just nitpicking, it probably
is more readable to declare them as arrays, so let's do that. A more
important point is that the code was just blithely assuming that the
result tupledesc has exactly one column; if it doesn't, we'd likely get
a crash of some sort in tuplestore_putvalues. Since the tupledesc is
manufactured outside of plperl, that seems like an uncomfortably long
chain of assumptions. We can nail it down at little cost with a sanity
check earlier in the function.
Diffstat (limited to 'src/backend/access/spgist/spgvalidate.c')
0 files changed, 0 insertions, 0 deletions