|
|
|
@ -7,7 +7,7 @@ |
|
|
|
|
* |
|
|
|
|
* Copyright (c) 1994, Regents of the University of California |
|
|
|
|
* |
|
|
|
|
* $Id: indexing.h,v 1.25 1999/09/30 10:31:44 wieck Exp $ |
|
|
|
|
* $Id: indexing.h,v 1.26 1999/11/01 02:29:26 momjian Exp $ |
|
|
|
|
* |
|
|
|
|
*------------------------------------------------------------------------- |
|
|
|
|
*/ |
|
|
|
@ -19,7 +19,9 @@ |
|
|
|
|
/*
|
|
|
|
|
* Some definitions for indices on pg_attribute |
|
|
|
|
*/ |
|
|
|
|
#define Num_pg_amop_indices 2 |
|
|
|
|
#define Num_pg_attr_indices 3 |
|
|
|
|
#define Num_pg_index_indices 1 |
|
|
|
|
#define Num_pg_proc_indices 2 |
|
|
|
|
#define Num_pg_type_indices 2 |
|
|
|
|
#define Num_pg_class_indices 2 |
|
|
|
@ -32,8 +34,11 @@ |
|
|
|
|
/*
|
|
|
|
|
* Names of indices on system catalogs |
|
|
|
|
*/ |
|
|
|
|
#define AccessMethodOpidIndex "pg_amop_opid_index" |
|
|
|
|
#define AccessMethodStrategyIndex "pg_amop_strategy_index" |
|
|
|
|
#define AttributeNameIndex "pg_attribute_relid_attnam_index" |
|
|
|
|
#define AttributeNumIndex "pg_attribute_relid_attnum_index" |
|
|
|
|
#define IndexRelidIndex "pg_index_indexrelid_index" |
|
|
|
|
#define AttributeRelidIndex "pg_attribute_attrelid_index" |
|
|
|
|
#define ProcedureOidIndex "pg_proc_oid_index" |
|
|
|
|
#define ProcedureNameIndex "pg_proc_proname_narg_type_index" |
|
|
|
@ -48,7 +53,9 @@ |
|
|
|
|
#define TriggerConstrRelidIndex "pg_trigger_tgconstrrelid_index" |
|
|
|
|
#define DescriptionObjIndex "pg_description_objoid_index" |
|
|
|
|
|
|
|
|
|
extern char *Name_pg_amop_indices[]; |
|
|
|
|
extern char *Name_pg_attr_indices[]; |
|
|
|
|
extern char *Name_pg_index_indices[]; |
|
|
|
|
extern char *Name_pg_proc_indices[]; |
|
|
|
|
extern char *Name_pg_type_indices[]; |
|
|
|
|
extern char *Name_pg_class_indices[]; |
|
|
|
@ -57,6 +64,7 @@ extern char *Name_pg_relcheck_indices[]; |
|
|
|
|
extern char *Name_pg_trigger_indices[]; |
|
|
|
|
extern char *Name_pg_description_indices[]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern char *IndexedCatalogNames[]; |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
@ -72,13 +80,17 @@ extern void CatalogIndexInsert(Relation *idescs, |
|
|
|
|
HeapTuple heapTuple); |
|
|
|
|
extern bool CatalogHasIndex(char *catName, Oid catId); |
|
|
|
|
|
|
|
|
|
extern HeapTuple AccessMethodOpidIndexScan(Relation heapRelation, |
|
|
|
|
Oid claid, Oid opopr, Oid opid); |
|
|
|
|
extern HeapTuple AccessMethodStrategyIndexScan(Relation heapRelation, |
|
|
|
|
Oid opid, Oid claid, int2 opstrategy); |
|
|
|
|
extern HeapTuple AttributeNameIndexScan(Relation heapRelation, |
|
|
|
|
Oid relid, |
|
|
|
|
char *attname); |
|
|
|
|
|
|
|
|
|
extern HeapTuple AttributeNumIndexScan(Relation heapRelation, |
|
|
|
|
Oid relid, |
|
|
|
|
AttrNumber attnum); |
|
|
|
|
extern HeapTuple IndexRelidIndexScan(Relation heapRelation, Oid relid); |
|
|
|
|
extern HeapTuple ProcedureOidIndexScan(Relation heapRelation, Oid procId); |
|
|
|
|
extern HeapTuple ProcedureNameIndexScan(Relation heapRelation, |
|
|
|
|
char *procName, int2 nargs, Oid *argTypes); |
|
|
|
@ -88,6 +100,8 @@ extern HeapTuple ClassNameIndexScan(Relation heapRelation, char *relName); |
|
|
|
|
extern HeapTuple ClassOidIndexScan(Relation heapRelation, Oid relId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* What follows are lines processed by genbki.sh to create the statements |
|
|
|
|
* the bootstrap parser will turn into DefineIndex commands. |
|
|
|
@ -95,10 +109,15 @@ extern HeapTuple ClassOidIndexScan(Relation heapRelation, Oid relId); |
|
|
|
|
* The keyword is DECLARE_INDEX every thing after that is just like in a |
|
|
|
|
* normal specification of the 'define index' POSTQUEL command. |
|
|
|
|
*/ |
|
|
|
|
DECLARE_INDEX(pg_amop_opid_index on pg_amop using btree(amopclaid oid_ops, amopopr oid_ops, amopid oid_ops)); |
|
|
|
|
DECLARE_INDEX(pg_amop_strategy_index on pg_amop using btree(amopid oid_ops, amopclaid oid_ops, amopstrategy int2_ops)); |
|
|
|
|
|
|
|
|
|
DECLARE_INDEX(pg_attribute_relid_attnam_index on pg_attribute using btree(attrelid oid_ops, attname name_ops)); |
|
|
|
|
DECLARE_INDEX(pg_attribute_relid_attnum_index on pg_attribute using btree(attrelid oid_ops, attnum int2_ops)); |
|
|
|
|
DECLARE_INDEX(pg_attribute_attrelid_index on pg_attribute using btree(attrelid oid_ops)); |
|
|
|
|
|
|
|
|
|
DECLARE_INDEX(pg_index_indexrelid_index on pg_index using btree(indexrelid oid_ops)); |
|
|
|
|
|
|
|
|
|
DECLARE_INDEX(pg_proc_oid_index on pg_proc using btree(oid oid_ops)); |
|
|
|
|
DECLARE_INDEX(pg_proc_proname_narg_type_index on pg_proc using btree(proname name_ops, pronargs int2_ops, proargtypes oid8_ops)); |
|
|
|
|
|
|
|
|
|