to columns of an RTE that was a function returning RECORD with a column
definition list. Apparently no one has tried to use non-default typmod
with a function returning RECORD before.
varnode = makeVar(rtindex,
attnum,
atttypid,
- -1,
+ colDef->typename->typmod,
sublevels_up);
*colvars = lappend(*colvars, varnode);
ColumnDef *colDef = list_nth(rte->coldeflist, attnum - 1);
*vartype = typenameTypeId(colDef->typename);
- *vartypmod = -1;
+ *vartypmod = colDef->typename->typmod;
}
else
{