mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +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:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/utils/rel.h,v 1.82 2005/01/10 20:02:24 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/utils/rel.h,v 1.83 2005/03/29 00:17:18 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -58,7 +58,8 @@ typedef struct Trigger
|
||||
bool tgdeferrable;
|
||||
bool tginitdeferred;
|
||||
int16 tgnargs;
|
||||
int16 tgattr[FUNC_MAX_ARGS];
|
||||
int16 tgnattr;
|
||||
int16 *tgattr;
|
||||
char **tgargs;
|
||||
} Trigger;
|
||||
|
||||
@@ -137,6 +138,7 @@ typedef struct RelationData
|
||||
Form_pg_index rd_index; /* pg_index tuple describing this index */
|
||||
struct HeapTupleData *rd_indextuple; /* all of pg_index tuple */
|
||||
/* "struct HeapTupleData *" avoids need to include htup.h here */
|
||||
oidvector *rd_indclass; /* extracted pointer to rd_index field */
|
||||
Form_pg_am rd_am; /* pg_am tuple for index's AM */
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user