mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
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.
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/commands/aggregatecmds.c,v 1.22 2004/12/31 21:59:41 pgsql Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/aggregatecmds.c,v 1.23 2005/03/29 00:16:57 tgl Exp $
|
||||
*
|
||||
* DESCRIPTION
|
||||
* The "DefineFoo" routines take the parse tree and pick out the
|
||||
@ -246,11 +246,11 @@ RenameAggregate(List *name, TypeName *basetype, const char *newname)
|
||||
namespaceOid = procForm->pronamespace;
|
||||
|
||||
/* make sure the new name doesn't exist */
|
||||
if (SearchSysCacheExists(PROCNAMENSP,
|
||||
if (SearchSysCacheExists(PROCNAMEARGSNSP,
|
||||
CStringGetDatum(newname),
|
||||
Int16GetDatum(procForm->pronargs),
|
||||
PointerGetDatum(procForm->proargtypes),
|
||||
ObjectIdGetDatum(namespaceOid)))
|
||||
PointerGetDatum(&procForm->proargtypes),
|
||||
ObjectIdGetDatum(namespaceOid),
|
||||
0))
|
||||
{
|
||||
if (basetypeOid == ANYOID)
|
||||
ereport(ERROR,
|
||||
@ -264,7 +264,7 @@ RenameAggregate(List *name, TypeName *basetype, const char *newname)
|
||||
errmsg("function %s already exists in schema \"%s\"",
|
||||
funcname_signature_string(newname,
|
||||
procForm->pronargs,
|
||||
procForm->proargtypes),
|
||||
procForm->proargtypes.values),
|
||||
get_namespace_name(namespaceOid))));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user