• Tom Lane's avatar
    Improve ExecEvalVar's handling of whole-row variables in cases where the · 292176a1
    Tom Lane authored
    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.
    292176a1
execQual.c 147 KB