Commit 915c04f0 authored by Tom Lane's avatar Tom Lane

Fix typmod exposed for scalar function in FROM, too.

On further reflection about commit 4d02eb01, it occurs to me that
expandRTE() had better agree with what addRangeTableEntryForFunction()
is doing.  So teach that about functions possibly having typmods, too.
parent a412f469
...@@ -2616,7 +2616,8 @@ expandRTE(RangeTblEntry *rte, int rtindex, int sublevels_up, ...@@ -2616,7 +2616,8 @@ expandRTE(RangeTblEntry *rte, int rtindex, int sublevels_up,
Var *varnode; Var *varnode;
varnode = makeVar(rtindex, atts_done + 1, varnode = makeVar(rtindex, atts_done + 1,
funcrettype, -1, funcrettype,
exprTypmod(rtfunc->funcexpr),
exprCollation(rtfunc->funcexpr), exprCollation(rtfunc->funcexpr),
sublevels_up); sublevels_up);
varnode->location = location; varnode->location = location;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment