summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane2005-03-29 00:17:27 +0000
committerTom Lane2005-03-29 00:17:27 +0000
commit70c9763d4815ac847f0f7694f43eb6a59a236868 (patch)
tree7d8aa05f668f1ef7809ff521b6c1e12d31125fd7 /doc/src
parent119191609c507528b20d74c59be69f2129127575 (diff)
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 'doc/src')
-rw-r--r--doc/src/sgml/catalogs.sgml55
-rw-r--r--doc/src/sgml/trigger.sgml5
2 files changed, 30 insertions, 30 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 2dc8b300956..946dd53b349 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -1,6 +1,6 @@
<!--
Documentation of the system catalogs, directed toward PostgreSQL developers
- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.97 2005/03/27 23:52:51 tgl Exp $
+ $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.98 2005/03/29 00:16:49 tgl Exp $
-->
<chapter id="catalogs">
@@ -2008,32 +2008,6 @@
</row>
<row>
- <entry><structfield>indkey</structfield></entry>
- <entry><type>int2vector</type></entry>
- <entry><literal><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</literal></entry>
- <entry>
- This is an array of <structfield>indnatts</structfield> (up to
- <symbol>INDEX_MAX_KEYS</symbol>) values that indicate which
- table columns this index indexes. For example a value of
- <literal>1 3</literal> would mean that the first and the third table
- columns make up the index key. A zero in this array indicates that the
- corresponding index attribute is an expression over the table columns,
- rather than a simple column reference.
- </entry>
- </row>
-
- <row>
- <entry><structfield>indclass</structfield></entry>
- <entry><type>oidvector</type></entry>
- <entry><literal><link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link>.oid</literal></entry>
- <entry>
- For each column in the index key this contains the OID of
- the operator class to use. See
- <structname>pg_opclass</structname> for details.
- </entry>
- </row>
-
- <row>
<entry><structfield>indnatts</structfield></entry>
<entry><type>int2</type></entry>
<entry></entry>
@@ -2064,6 +2038,31 @@
</row>
<row>
+ <entry><structfield>indkey</structfield></entry>
+ <entry><type>int2vector</type></entry>
+ <entry><literal><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</literal></entry>
+ <entry>
+ This is an array of <structfield>indnatts</structfield> values that
+ indicate which table columns this index indexes. For example a value
+ of <literal>1 3</literal> would mean that the first and the third table
+ columns make up the index key. A zero in this array indicates that the
+ corresponding index attribute is an expression over the table columns,
+ rather than a simple column reference.
+ </entry>
+ </row>
+
+ <row>
+ <entry><structfield>indclass</structfield></entry>
+ <entry><type>oidvector</type></entry>
+ <entry><literal><link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link>.oid</literal></entry>
+ <entry>
+ For each column in the index key this contains the OID of
+ the operator class to use. See
+ <structname>pg_opclass</structname> for details.
+ </entry>
+ </row>
+
+ <row>
<entry><structfield>indexprs</structfield></entry>
<entry><type>text</type></entry>
<entry></entry>
@@ -3637,7 +3636,7 @@
(<structfield>typlen</structfield> = -1),
but some fixed-length (<structfield>typlen</structfield> &gt; 0) types
also have nonzero <structfield>typelem</structfield>, for example
- <type>name</type> and <type>oidvector</type>.
+ <type>name</type> and <type>point</type>.
If a fixed-length type has a <structfield>typelem</structfield> then
its internal representation must be some number of values of the
<structfield>typelem</structfield> data type with no other data.
diff --git a/doc/src/sgml/trigger.sgml b/doc/src/sgml/trigger.sgml
index 5960ff93ad5..e6c8271f1d3 100644
--- a/doc/src/sgml/trigger.sgml
+++ b/doc/src/sgml/trigger.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/trigger.sgml,v 1.41 2005/01/22 22:56:36 momjian Exp $
+$PostgreSQL: pgsql/doc/src/sgml/trigger.sgml,v 1.42 2005/03/29 00:16:49 tgl Exp $
-->
<chapter id="triggers">
@@ -453,7 +453,8 @@ typedef struct Trigger
bool tgdeferrable;
bool tginitdeferred;
int16 tgnargs;
- int16 tgattr[FUNC_MAX_ARGS];
+ int16 tgnattr;
+ int16 *tgattr;
char **tgargs;
} Trigger;
</programlisting>