Skip site navigation (1) Skip section navigation (2)

pgsql: Fix subselect.c to avoid assuming that a SubLink's testexpr

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix subselect.c to avoid assuming that a SubLink's testexpr
Date: 2008-01-17 20:35:28
Message-ID: 20080117203528.05E03754108@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Fix subselect.c to avoid assuming that a SubLink's testexpr references each
subquery output column exactly once left-to-right.  Although this is the case
in the original parser output, it might not be so after rewriting and
constant-folding, as illustrated by bug #3882 from Jan Mate.  Instead
scan the subquery's target list to obtain needed per-column information;
this is duplicative of what the parser did, but only a couple dozen lines
need be copied, and we can clean up a couple of notational uglinesses.
Bug was introduced in 8.2 as part of revision of SubLink representation.

Modified Files:
--------------
    pgsql/src/backend/optimizer/plan:
        subselect.c (r1.128 -> r1.129)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/subselect.c?r1=1.128&r2=1.129)

pgsql-committers by date

Next:From: Tom LaneDate: 2008-01-17 20:35:34
Subject: pgsql: Fix subselect.c to avoid assuming that a SubLink's testexpr
Previous:From: Tom LaneDate: 2008-01-17 18:56:54
Subject: pgsql: Fix ALTER INDEX RENAME so that if the index belongs to a unique

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group