summaryrefslogtreecommitdiff
path: root/src/include/utils/syscache.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-08-21 16:36:06 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-08-21 16:36:06 +0000
commitf933766ba7c5446a28d714904ae0c46d8b21b86a (patch)
tree81c8ecd2a2f8161d91670f5325331ba1704c2ab7 /src/include/utils/syscache.h
parentc2d156691292d7be998eacf5b99dce3ea3c29ab2 (diff)
downloadpostgresql-f933766ba7c5446a28d714904ae0c46d8b21b86a.tar.gz
Restructure pg_opclass, pg_amop, and pg_amproc per previous discussions in
pgsql-hackers. pg_opclass now has a row for each opclass supported by each index AM, not a row for each opclass name. This allows pg_opclass to show directly whether an AM supports an opclass, and furthermore makes it possible to store additional information about an opclass that might be AM-dependent. pg_opclass and pg_amop now store "lossy" and "haskeytype" information that we previously expected the user to remember to provide in CREATE INDEX commands. Lossiness is no longer an index-level property, but is associated with the use of a particular operator in a particular index opclass. Along the way, IndexSupportInitialize now uses the syscaches to retrieve pg_amop and pg_amproc entries. I find this reduces backend launch time by about ten percent, at the cost of a couple more special cases in catcache.c's IndexScanOK. Initial work by Oleg Bartunov and Teodor Sigaev, further hacking by Tom Lane. initdb forced.
Diffstat (limited to 'src/include/utils/syscache.h')
-rw-r--r--src/include/utils/syscache.h47
1 files changed, 24 insertions, 23 deletions
diff --git a/src/include/utils/syscache.h b/src/include/utils/syscache.h
index b9b77ca2ce..6a71d77bfc 100644
--- a/src/include/utils/syscache.h
+++ b/src/include/utils/syscache.h
@@ -9,7 +9,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: syscache.h,v 1.32 2001/08/10 18:57:41 tgl Exp $
+ * $Id: syscache.h,v 1.33 2001/08/21 16:36:06 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -32,28 +32,29 @@
#define AMNAME 1
#define AMOPOPID 2
#define AMOPSTRATEGY 3
-#define ATTNAME 4
-#define ATTNUM 5
-#define CLADEFTYPE 6
-#define CLANAME 7
-#define GRONAME 8
-#define GROSYSID 9
-#define INDEXRELID 10
-#define INHRELID 11
-#define LANGNAME 12
-#define LANGOID 13
-#define OPERNAME 14
-#define OPEROID 15
-#define PROCNAME 16
-#define PROCOID 17
-#define RELNAME 18
-#define RELOID 19
-#define RULENAME 20
-#define SHADOWNAME 21
-#define SHADOWSYSID 22
-#define STATRELATT 23
-#define TYPENAME 24
-#define TYPEOID 25
+#define AMPROCNUM 4
+#define ATTNAME 5
+#define ATTNUM 6
+#define CLAAMNAME 7
+#define CLAOID 8
+#define GRONAME 9
+#define GROSYSID 10
+#define INDEXRELID 11
+#define INHRELID 12
+#define LANGNAME 13
+#define LANGOID 14
+#define OPERNAME 15
+#define OPEROID 16
+#define PROCNAME 17
+#define PROCOID 18
+#define RELNAME 19
+#define RELOID 20
+#define RULENAME 21
+#define SHADOWNAME 22
+#define SHADOWSYSID 23
+#define STATRELATT 24
+#define TYPENAME 25
+#define TYPEOID 26
extern void InitCatalogCache(void);