Skip to content

Commit 915c04f

Browse files
committed
Fix typmod exposed for scalar function in FROM, too.
On further reflection about commit 4d02eb0, it occurs to me that expandRTE() had better agree with what addRangeTableEntryForFunction() is doing. So teach that about functions possibly having typmods, too.
1 parent a412f46 commit 915c04f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/parser/parse_relation.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2616,7 +2616,8 @@ expandRTE(RangeTblEntry *rte, int rtindex, int sublevels_up,
26162616
Var *varnode;
26172617

26182618
varnode = makeVar(rtindex, atts_done + 1,
2619-
funcrettype, -1,
2619+
funcrettype,
2620+
exprTypmod(rtfunc->funcexpr),
26202621
exprCollation(rtfunc->funcexpr),
26212622
sublevels_up);
26222623
varnode->location = location;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy