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 20080411225333.484207559CC@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.

Tags:
----
REL7_4_STABLE

Modified Files:
--------------
    pgsql/contrib/ltree:
        ltree_io.c (r1.7.4.1 -> r1.7.4.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/ltree/ltree_io.c?r1=1.7.4.1&r2=1.7.4.2)
    pgsql/src/backend/utils/adt:
        geo_ops.c (r1.82.2.2 -> r1.82.2.3)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/geo_ops.c?r1=1.82.2.2&r2=1.82.2.3)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix several datatype input functions that were allowing unused
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Add some debug support code to try to catch future mistakes in