pgsql: Teach eval_const_expressions() to simplify an ArrayCoerceExpr to - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Teach eval_const_expressions() to simplify an ArrayCoerceExpr to
Date
Msg-id 20080826021632.30C6B755315@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Teach eval_const_expressions() to simplify an ArrayCoerceExpr to a constant
when its input is constant and the element coercion function is immutable
(or nonexistent, ie, binary-coercible case).  This is an oversight in the
8.3 implementation of ArrayCoerceExpr, and its result is that certain cases
involving IN or NOT IN with constants don't get optimized as they should be.
Per experimentation with an example from Ow Mun Heng.

Modified Files:
--------------
    pgsql/src/backend/optimizer/util:
        clauses.c (r1.264 -> r1.265)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/clauses.c?r1=1.264&r2=1.265)

pgsql-committers by date:

Previous
From: jbcooley@pgfoundry.org (User Jbcooley)
Date:
Subject: npgsql - Npgsql2: more support for uuid type.
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Teach eval_const_expressions() to simplify an ArrayCoerceExpr to