diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2012-01-27 20:16:17 +0200 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2012-01-27 20:16:17 +0200 |
commit | 8137f2c32322c624e0431fac1621e8e9315202f9 (patch) | |
tree | 8a951ae9cc44d87c7e9d1b09d40396dd7e67d139 /src/include/catalog/pg_index.h | |
parent | 8a3f745f160d8334ad978676828d3926ac949f43 (diff) | |
download | postgresql-8137f2c32322c624e0431fac1621e8e9315202f9.tar.gz |
Hide most variable-length fields from Form_pg_* structs
Those fields only appear in the structs so that genbki.pl can create
the BKI bootstrap files for the catalogs. But they are not actually
usable from C. So hiding them can prevent coding mistakes, saves
stack space, and can help the compiler.
In certain catalogs, the first variable-length field has been kept
visible after manual inspection. These exceptions are noted in C
comments.
reviewed by Tom Lane
Diffstat (limited to 'src/include/catalog/pg_index.h')
-rw-r--r-- | src/include/catalog/pg_index.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/catalog/pg_index.h b/src/include/catalog/pg_index.h index 6c301ff17f..92ca22c686 100644 --- a/src/include/catalog/pg_index.h +++ b/src/include/catalog/pg_index.h @@ -42,8 +42,9 @@ CATALOG(pg_index,2610) BKI_WITHOUT_OIDS BKI_SCHEMA_MACRO bool indcheckxmin; /* must we wait for xmin to be old? */ bool indisready; /* is this index ready for inserts? */ - /* VARIABLE LENGTH FIELDS: */ + /* variable-length fields start here, but we allow direct access to indkey */ int2vector indkey; /* column numbers of indexed cols, or 0 */ +#ifdef CATALOG_VARLEN oidvector indcollation; /* collation identifiers */ oidvector indclass; /* opclass identifiers */ int2vector indoption; /* per-column flags (AM-specific meanings) */ @@ -52,6 +53,7 @@ CATALOG(pg_index,2610) BKI_WITHOUT_OIDS BKI_SCHEMA_MACRO * each zero entry in indkey[] */ pg_node_tree indpred; /* expression tree for predicate, if a partial * index; else NULL */ +#endif } FormData_pg_index; /* ---------------- |