pgsql: Fix an old problem in decompilation of CASE constructs: the - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix an old problem in decompilation of CASE constructs: the
Date
Msg-id 20090225180014.D90B07559ED@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Fix an old problem in decompilation of CASE constructs: the ruleutils.c code
looks for a CaseTestExpr to figure out what the parser did, but it failed to
consider the possibility that an implicit coercion might be inserted above
the CaseTestExpr.  This could result in an Assert failure in some cases
(but correct results if Asserts weren't enabled), or an "unexpected CASE WHEN
clause" error in other cases.  Per report from Alan Li.

Back-patch to 8.1; problem doesn't exist before that because CASE was
implemented differently.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        ruleutils.c (r1.235.2.6 -> r1.235.2.7)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ruleutils.c?r1=1.235.2.6&r2=1.235.2.7)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix an old problem in decompilation of CASE constructs: the
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix an old problem in decompilation of CASE constructs: the