]> granicus.if.org Git - postgresql/commit
Fix several datatype input functions that were allowing unused bytes in their
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 11 Apr 2008 22:52:17 +0000 (22:52 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 11 Apr 2008 22:52:17 +0000 (22:52 +0000)
commit56295419f2a52930dea506d9e08b8eb8ce50b7c0
treeacf29df78f1d9b9dde75344f28ae8fcd0d875f34
parent36146d4d54488c0fc605374735224e4fb7a6bd14
Fix several datatype input functions that were allowing unused bytes in their
results to contain uninitialized, unpredictable values.  While this was okay
as far as the datatypes themselves were concerned, it's a problem for the
parser because occurrences of the "same" literal might not be recognized as
equal by datumIsEqual (and hence not by equal()).  It seems sufficient to fix
this in the input functions since the only critical use of equal() is in the
parser's comparisons of ORDER BY and DISTINCT expressions.
Per a trouble report from Marc Cousin.

Patch all the way back.  Interestingly, array_in did not have the bug before
8.2, which may explain why the issue went unnoticed for so long.
contrib/ltree/ltree_io.c
src/backend/utils/adt/arrayfuncs.c
src/backend/utils/adt/geo_ops.c
src/backend/utils/adt/tsquery.c