projects
/
users
/
gsingh
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a412f46
)
Fix typmod exposed for scalar function in FROM, too.
author
Tom Lane
<tgl@sss.pgh.pa.us>
Thu, 2 Jan 2020 19:02:46 +0000
(14:02 -0500)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Thu, 2 Jan 2020 19:02:55 +0000
(14:02 -0500)
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.
src/backend/parser/parse_relation.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/parser/parse_relation.c
b/src/backend/parser/parse_relation.c
index 2e0c278f355d687bfb5dafbb04566b4a4303fcf3..ceed0ceb482bc6a11e947aafba5135602958a171 100644
(file)
--- 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;