aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes/nodeFuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2024-10-31 15:53:58 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2024-10-31 16:09:27 -0400
commit89e51abcb2905d6beaa09a7d3603d6882ac27033 (patch)
tree27dba1ec7f0bd023f1bfa5103fbafdf3c0841595 /src/backend/nodes/nodeFuncs.c
parentb82c877e76e2398409e823773413079668cf1881 (diff)
downloadpostgresql-89e51abcb2905d6beaa09a7d3603d6882ac27033.tar.gz
postgresql-89e51abcb2905d6beaa09a7d3603d6882ac27033.zip
Add a parse location field to struct FunctionParameter.
This allows an error cursor to be supplied for a bunch of bad-function-definition errors that previously lacked one, or that cheated a bit by pointing at the contained type name when the error isn't really about that. Bump catversion from an abundance of caution --- I don't think this node type can actually appear in stored views/rules, but better safe than sorry. Jian He and Tom Lane (extracted from a larger patch by Jian, with some additional work by me) Discussion: https://postgr.es/m/CACJufxEmONE3P2En=jopZy1m=cCCUs65M4+1o52MW5og9oaUPA@mail.gmail.com
Diffstat (limited to 'src/backend/nodes/nodeFuncs.c')
-rw-r--r--src/backend/nodes/nodeFuncs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/nodes/nodeFuncs.c b/src/backend/nodes/nodeFuncs.c
index f76072228c9..3060847b133 100644
--- a/src/backend/nodes/nodeFuncs.c
+++ b/src/backend/nodes/nodeFuncs.c
@@ -1723,8 +1723,7 @@ exprLocation(const Node *expr)
loc = ((const Constraint *) expr)->location;
break;
case T_FunctionParameter:
- /* just use typename's location */
- loc = exprLocation((Node *) ((const FunctionParameter *) expr)->argType);
+ loc = ((const FunctionParameter *) expr)->location;
break;
case T_XmlSerialize:
/* XMLSERIALIZE keyword should always be the first thing */