pgsql: Improve ExecEvalVar's handling of whole-row variables in cases

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve ExecEvalVar's handling of whole-row variables in cases
Date: 2010-01-11 15:31:12
Message-ID: 20100111153112.AF0D47541B9@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Improve ExecEvalVar's handling of whole-row variables in cases where the
rowtype contains dropped columns. Sometimes the input tuple will be formed
from a select targetlist in which dropped columns are filled with a NULL
of an arbitrary type (the planner typically uses INT4, since it can't tell
what type the dropped column really was). So we need to relax the rowtype
compatibility check to not insist on physical compatibility if the actual
column value is NULL.

In principle we might need to do this for functions returning composite
types, too (see tupledesc_match()). In practice there doesn't seem to be
a bug there, probably because the function will be using the same cached
rowtype descriptor as the caller. Fixing that code path would require
significant rearrangement, so I left it alone for now.

Per complaint from Filip Rembialkowski.

Tags:
----
REL8_4_STABLE

Modified Files:
--------------
pgsql/src/backend/executor:
execQual.c (r1.250.2.2 -> r1.250.2.3)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execQual.c?r1=1.250.2.2&r2=1.250.2.3)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2010-01-11 18:39:32 pgsql: Add some simple support and documentation for using
Previous Message Tom Lane 2010-01-11 15:31:04 pgsql: Improve ExecEvalVar's handling of whole-row variables in cases