mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
Fix typmod exposed for scalar function in FROM, too.
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.
This commit is contained in:
@ -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;
|
||||||
|
Reference in New Issue
Block a user