aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-04-22 01:26:01 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-04-22 01:26:01 +0000
commit2206b498d8240447a9353ce4e994ba41a8e307ac (patch)
treeeb60585d0dae556ae45aae35a7d50f83be715ab4 /src/backend/utils/adt
parent0606860a20511c41d5c9074831e6328547722537 (diff)
downloadpostgresql-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/utils/adt')
-rw-r--r--src/backend/utils/adt/ruleutils.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 902af40d9fc..c0db64bf896 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -2,7 +2,7 @@
* ruleutils.c - Functions to convert stored expressions/querytrees
* back to source text
*
- * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.219 2006/04/08 18:49:52 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.220 2006/04/22 01:26:00 tgl Exp $
**********************************************************************/
#include "postgres.h"
@@ -3120,24 +3120,7 @@ get_rule_expr(Node *node, deparse_context *context,
break;
case T_Param:
- {
- Param *param = (Param *) node;
-
- switch (param->paramkind)
- {
- case PARAM_NAMED:
- appendStringInfo(buf, "$%s", param->paramname);
- break;
- case PARAM_NUM:
- case PARAM_EXEC:
- case PARAM_SUBLINK:
- appendStringInfo(buf, "$%d", param->paramid);
- break;
- default:
- appendStringInfo(buf, "(param)");
- break;
- }
- }
+ appendStringInfo(buf, "$%d", ((Param *) node)->paramid);
break;
case T_Aggref: