diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-03-29 00:17:27 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-03-29 00:17:27 +0000 |
| commit | 70c9763d4815ac847f0f7694f43eb6a59a236868 (patch) | |
| tree | 7d8aa05f668f1ef7809ff521b6c1e12d31125fd7 /src/pl/plpgsql | |
| parent | 119191609c507528b20d74c59be69f2129127575 (diff) | |
| download | postgresql-70c9763d4815ac847f0f7694f43eb6a59a236868.tar.gz | |
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.
Diffstat (limited to 'src/pl/plpgsql')
| -rw-r--r-- | src/pl/plpgsql/src/pl_comp.c | 4 | ||||
| -rw-r--r-- | src/pl/plpgsql/src/pl_handler.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/pl/plpgsql/src/pl_comp.c b/src/pl/plpgsql/src/pl_comp.c index 6ae93b7f20..4d23062f6e 100644 --- a/src/pl/plpgsql/src/pl_comp.c +++ b/src/pl/plpgsql/src/pl_comp.c @@ -3,7 +3,7 @@ * procedural language * * IDENTIFICATION - * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.84 2005/02/22 07:18:24 neilc Exp $ + * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.85 2005/03/29 00:17:23 tgl Exp $ * * This software is copyrighted by Jan Wieck - Hamburg. * @@ -1843,7 +1843,7 @@ compute_function_hashkey(FunctionCallInfo fcinfo, /* get the argument types */ for (i = 0; i < procStruct->pronargs; i++) { - Oid argtypeid = procStruct->proargtypes[i]; + Oid argtypeid = procStruct->proargtypes.values[i]; /* * Check for polymorphic arguments. If found, use the actual diff --git a/src/pl/plpgsql/src/pl_handler.c b/src/pl/plpgsql/src/pl_handler.c index 06e7342916..c20efe7739 100644 --- a/src/pl/plpgsql/src/pl_handler.c +++ b/src/pl/plpgsql/src/pl_handler.c @@ -3,7 +3,7 @@ * procedural language * * IDENTIFICATION - * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_handler.c,v 1.24 2005/02/22 07:18:24 neilc Exp $ + * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_handler.c,v 1.25 2005/03/29 00:17:23 tgl Exp $ * * This software is copyrighted by Jan Wieck - Hamburg. * @@ -189,16 +189,16 @@ plpgsql_validator(PG_FUNCTION_ARGS) haspolyarg = false; for (i = 0; i < proc->pronargs; i++) { - if (get_typtype(proc->proargtypes[i]) == 'p') + if (get_typtype(proc->proargtypes.values[i]) == 'p') { - if (proc->proargtypes[i] == ANYARRAYOID || - proc->proargtypes[i] == ANYELEMENTOID) + if (proc->proargtypes.values[i] == ANYARRAYOID || + proc->proargtypes.values[i] == ANYELEMENTOID) haspolyarg = true; else ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("plpgsql functions cannot take type %s", - format_type_be(proc->proargtypes[i])))); + format_type_be(proc->proargtypes.values[i])))); } } |
