From 70c9763d4815ac847f0f7694f43eb6a59a236868 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 29 Mar 2005 00:17:27 +0000 Subject: Convert oidvector and int2vector into variable-length arrays. This change saves a great deal of space in pg_proc and its primary index, and it eliminates the former requirement that INDEX_MAX_KEYS and FUNC_MAX_ARGS have the same value. INDEX_MAX_KEYS is still embedded in the on-disk representation (because it affects index tuple header size), but FUNC_MAX_ARGS is not. I believe it would now be possible to increase FUNC_MAX_ARGS at little cost, but haven't experimented yet. There are still a lot of vestigial references to FUNC_MAX_ARGS, which I will clean up in a separate pass. However, getting rid of it altogether would require changing the FunctionCallInfoData struct, and I'm not sure I want to buy into that. --- src/backend/parser/parse_agg.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/backend/parser/parse_agg.c') diff --git a/src/backend/parser/parse_agg.c b/src/backend/parser/parse_agg.c index 4781a58317..18a42c5742 100644 --- a/src/backend/parser/parse_agg.c +++ b/src/backend/parser/parse_agg.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/parse_agg.c,v 1.67 2005/03/10 23:21:23 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/parser/parse_agg.c,v 1.68 2005/03/29 00:17:04 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -367,14 +367,13 @@ build_aggregate_fnexprs(Oid agg_input_type, Expr **transfnexpr, Expr **finalfnexpr) { - Oid transfn_arg_types[FUNC_MAX_ARGS]; int transfn_nargs; Param *arg0; Param *arg1; List *args; - /* get the transition function signature (only need nargs) */ - (void) get_func_signature(transfn_oid, transfn_arg_types, &transfn_nargs); + /* get the transition function arg count */ + transfn_nargs = get_func_nargs(transfn_oid); /* * Build arg list to use in the transfn FuncExpr node. We really only -- cgit v1.2.1