mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user