diff options
author | Tom Lane | 2020-01-02 19:02:46 +0000 |
---|---|---|
committer | Tom Lane | 2020-01-02 19:02:55 +0000 |
commit | 915c04f091f13dbbc0fde833e612dc90b70103ce (patch) | |
tree | 5a1f1b828a4b2757b919fe64ba7abc0e20e692ef /src/backend/parser/parse_relation.c | |
parent | a412f469880ede9f52336a7b383905129c2b03a0 (diff) |
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.
Diffstat (limited to 'src/backend/parser/parse_relation.c')
-rw-r--r-- | src/backend/parser/parse_relation.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c index 2e0c278f355..ceed0ceb482 100644 --- a/src/backend/parser/parse_relation.c +++ b/src/backend/parser/parse_relation.c @@ -2616,7 +2616,8 @@ expandRTE(RangeTblEntry *rte, int rtindex, int sublevels_up, Var *varnode; varnode = makeVar(rtindex, atts_done + 1, - funcrettype, -1, + funcrettype, + exprTypmod(rtfunc->funcexpr), exprCollation(rtfunc->funcexpr), sublevels_up); varnode->location = location; |