diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-04-22 01:26:01 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-04-22 01:26:01 +0000 |
commit | 2206b498d8240447a9353ce4e994ba41a8e307ac (patch) | |
tree | eb60585d0dae556ae45aae35a7d50f83be715ab4 /src/backend/parser/parse_expr.c | |
parent | 0606860a20511c41d5c9074831e6328547722537 (diff) | |
download | postgresql-2206b498d8240447a9353ce4e994ba41a8e307ac.tar.gz postgresql-2206b498d8240447a9353ce4e994ba41a8e307ac.zip |
Simplify ParamListInfo data structure to support only numbered parameters,
not named ones, and replace linear searches of the list with array indexing.
The named-parameter support has been dead code for many years anyway,
and recent profiling suggests that the searching was costing a noticeable
amount of performance for complex queries.
Diffstat (limited to 'src/backend/parser/parse_expr.c')
-rw-r--r-- | src/backend/parser/parse_expr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index cae682c9e77..414afe6dfa5 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.191 2006/03/14 22:48:21 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.192 2006/04/22 01:26:00 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -568,8 +568,8 @@ transformParamRef(ParseState *pstate, ParamRef *pref) } param = makeNode(Param); - param->paramkind = PARAM_NUM; - param->paramid = (AttrNumber) paramno; + param->paramkind = PARAM_EXTERN; + param->paramid = paramno; param->paramtype = toppstate->p_paramtypes[paramno - 1]; return (Node *) param; @@ -1177,7 +1177,7 @@ transformSubLink(ParseState *pstate, SubLink *sublink) param = makeNode(Param); param->paramkind = PARAM_SUBLINK; - param->paramid = (AttrNumber) tent->resno; + param->paramid = tent->resno; param->paramtype = exprType((Node *) tent->expr); right_list = lappend(right_list, param); |