pgsql: Fix several datatype input functions that were allowing unused - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix several datatype input functions that were allowing unused
Date
Msg-id 20080411225205.A2AC07559CC@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
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.

Modified Files:
--------------
    pgsql/contrib/ltree:
        ltree_io.c (r1.14 -> r1.15)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/ltree/ltree_io.c?r1=1.14&r2=1.15)
    pgsql/src/backend/utils/adt:
        arrayfuncs.c (r1.142 -> r1.143)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/arrayfuncs.c?r1=1.142&r2=1.143)
        geo_ops.c (r1.99 -> r1.100)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/geo_ops.c?r1=1.99&r2=1.100)
        tsquery.c (r1.16 -> r1.17)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/tsquery.c?r1=1.16&r2=1.17)

pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pgsql: Changed TODO wording: < * Support procedures, which return no
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix several datatype input functions that were allowing unused