pgsql: Fix several datatype input functions that were allowing unused

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix several datatype input functions that were allowing unused
Date: 2008-04-11 22:52:17
Message-ID: 20080411225217.6580F7559CC@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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:
----
REL8_3_STABLE

Modified Files:
--------------
pgsql/contrib/ltree:
ltree_io.c (r1.14 -> r1.14.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/ltree/ltree_io.c?r1=1.14&r2=1.14.2.1)
pgsql/src/backend/utils/adt:
arrayfuncs.c (r1.140 -> r1.140.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/arrayfuncs.c?r1=1.140&r2=1.140.2.1)
geo_ops.c (r1.99 -> r1.99.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/geo_ops.c?r1=1.99&r2=1.99.2.1)
tsquery.c (r1.15 -> r1.15.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/tsquery.c?r1=1.15&r2=1.15.2.1)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2008-04-11 22:53:06 pgsql: Fix several datatype input functions that were allowing unused
Previous Message Tom Lane 2008-04-11 22:52:05 pgsql: Fix several datatype input functions that were allowing unused