On further reflection about commit
4d02eb017, it occurs to me that
expandRTE() had better agree with what addRangeTableEntryForFunction()
is doing. So teach that about functions possibly having typmods, too.
Var *varnode;
varnode = makeVar(rtindex, atts_done + 1,
- funcrettype, -1,
+ funcrettype,
+ exprTypmod(rtfunc->funcexpr),
exprCollation(rtfunc->funcexpr),
sublevels_up);
varnode->location = location;