diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/access/gist.h | 6 | ||||
-rw-r--r-- | src/include/catalog/catversion.h | 4 | ||||
-rw-r--r-- | src/include/catalog/index.h | 3 | ||||
-rw-r--r-- | src/include/catalog/indexing.h | 23 | ||||
-rw-r--r-- | src/include/catalog/pg_amop.h | 471 | ||||
-rw-r--r-- | src/include/catalog/pg_amproc.h | 134 | ||||
-rw-r--r-- | src/include/catalog/pg_index.h | 38 | ||||
-rw-r--r-- | src/include/catalog/pg_opclass.h | 155 | ||||
-rw-r--r-- | src/include/commands/defrem.h | 3 | ||||
-rw-r--r-- | src/include/nodes/parsenodes.h | 3 | ||||
-rw-r--r-- | src/include/nodes/relation.h | 6 | ||||
-rw-r--r-- | src/include/optimizer/paths.h | 6 | ||||
-rw-r--r-- | src/include/utils/lsyscache.h | 6 | ||||
-rw-r--r-- | src/include/utils/syscache.h | 47 |
14 files changed, 442 insertions, 463 deletions
diff --git a/src/include/access/gist.h b/src/include/access/gist.h index af9b7c3b0d..760c025af6 100644 --- a/src/include/access/gist.h +++ b/src/include/access/gist.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: gist.h,v 1.30 2001/08/10 14:34:28 momjian Exp $ + * $Id: gist.h,v 1.31 2001/08/21 16:36:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -73,8 +73,8 @@ typedef struct GISTSTATE FmgrInfo picksplitFn[INDEX_MAX_KEYS]; FmgrInfo equalFn[INDEX_MAX_KEYS]; bool attbyval[INDEX_MAX_KEYS]; - bool haskeytype; - bool keytypbyval; + bool haskeytype[INDEX_MAX_KEYS]; + bool keytypbyval[INDEX_MAX_KEYS]; } GISTSTATE; diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index 6a192ecd81..ea29659373 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -37,7 +37,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: catversion.h,v 1.90 2001/08/16 20:38:54 tgl Exp $ + * $Id: catversion.h,v 1.91 2001/08/21 16:36:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 200108151 +#define CATALOG_VERSION_NO 200108211 #endif diff --git a/src/include/catalog/index.h b/src/include/catalog/index.h index 08d61e2bb1..d3e3bae704 100644 --- a/src/include/catalog/index.h +++ b/src/include/catalog/index.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: index.h,v 1.38 2001/08/10 18:57:39 tgl Exp $ + * $Id: index.h,v 1.39 2001/08/21 16:36:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -39,7 +39,6 @@ extern Oid index_create(char *heapRelationName, IndexInfo *indexInfo, Oid accessMethodObjectId, Oid *classObjectId, - bool islossy, bool primary, bool allow_system_table_mods); diff --git a/src/include/catalog/indexing.h b/src/include/catalog/indexing.h index 004430096a..0e14819db8 100644 --- a/src/include/catalog/indexing.h +++ b/src/include/catalog/indexing.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: indexing.h,v 1.52 2001/08/10 18:57:39 tgl Exp $ + * $Id: indexing.h,v 1.53 2001/08/21 16:36:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -34,7 +34,7 @@ #define Num_pg_inherits_indices 1 #define Num_pg_language_indices 2 #define Num_pg_largeobject_indices 1 -#define Num_pg_opclass_indices 3 +#define Num_pg_opclass_indices 2 #define Num_pg_operator_indices 2 #define Num_pg_proc_indices 2 #define Num_pg_relcheck_indices 1 @@ -47,9 +47,9 @@ /* * Names of indices on system catalogs */ -#define AccessMethodOpidIndex "pg_amop_opid_index" -#define AccessMethodStrategyIndex "pg_amop_strategy_index" -#define AccessProcedureIndex "pg_amproc_am_opcl_procnum_index" +#define AccessMethodOperatorIndex "pg_amop_opc_opr_index" +#define AccessMethodStrategyIndex "pg_amop_opc_strategy_index" +#define AccessMethodProcedureIndex "pg_amproc_opc_procnum_index" #define AggregateNameTypeIndex "pg_aggregate_name_type_index" #define AggregateOidIndex "pg_aggregate_oid_index" #define AmNameIndex "pg_am_name_index" @@ -70,8 +70,7 @@ #define LanguageNameIndex "pg_language_name_index" #define LanguageOidIndex "pg_language_oid_index" #define LargeObjectLOidPNIndex "pg_largeobject_loid_pn_index" -#define OpclassDeftypeIndex "pg_opclass_deftype_index" -#define OpclassNameIndex "pg_opclass_name_index" +#define OpclassAmNameIndex "pg_opclass_am_name_index" #define OpclassOidIndex "pg_opclass_oid_index" #define OperatorNameIndex "pg_operator_oprname_l_r_k_index" #define OperatorOidIndex "pg_operator_oid_index" @@ -155,9 +154,9 @@ DECLARE_UNIQUE_INDEX(pg_aggregate_name_type_index on pg_aggregate using btree(ag DECLARE_UNIQUE_INDEX(pg_aggregate_oid_index on pg_aggregate using btree(oid oid_ops)); DECLARE_UNIQUE_INDEX(pg_am_name_index on pg_am using btree(amname name_ops)); DECLARE_UNIQUE_INDEX(pg_am_oid_index on pg_am using btree(oid oid_ops)); -DECLARE_UNIQUE_INDEX(pg_amop_opid_index on pg_amop using btree(amopclaid oid_ops, amopopr oid_ops, amopid oid_ops)); -DECLARE_UNIQUE_INDEX(pg_amop_strategy_index on pg_amop using btree(amopid oid_ops, amopclaid oid_ops, amopstrategy int2_ops)); -DECLARE_UNIQUE_INDEX(pg_amproc_am_opcl_procnum_index on pg_amproc using btree(amid oid_ops, amopclaid oid_ops, amprocnum int2_ops)); +DECLARE_UNIQUE_INDEX(pg_amop_opc_opr_index on pg_amop using btree(amopclaid oid_ops, amopopr oid_ops)); +DECLARE_UNIQUE_INDEX(pg_amop_opc_strategy_index on pg_amop using btree(amopclaid oid_ops, amopstrategy int2_ops)); +DECLARE_UNIQUE_INDEX(pg_amproc_opc_procnum_index on pg_amproc using btree(amopclaid oid_ops, amprocnum int2_ops)); DECLARE_UNIQUE_INDEX(pg_attrdef_adrelid_adnum_index on pg_attrdef using btree(adrelid oid_ops, adnum int2_ops)); DECLARE_UNIQUE_INDEX(pg_attribute_relid_attnam_index on pg_attribute using btree(attrelid oid_ops, attname name_ops)); DECLARE_UNIQUE_INDEX(pg_attribute_relid_attnum_index on pg_attribute using btree(attrelid oid_ops, attnum int2_ops)); @@ -175,9 +174,7 @@ DECLARE_UNIQUE_INDEX(pg_inherits_relid_seqno_index on pg_inherits using btree(in DECLARE_UNIQUE_INDEX(pg_language_name_index on pg_language using btree(lanname name_ops)); DECLARE_UNIQUE_INDEX(pg_language_oid_index on pg_language using btree(oid oid_ops)); DECLARE_UNIQUE_INDEX(pg_largeobject_loid_pn_index on pg_largeobject using btree(loid oid_ops, pageno int4_ops)); -/* This column needs to allow multiple zero entries, but is in the cache */ -DECLARE_INDEX(pg_opclass_deftype_index on pg_opclass using btree(opcdeftype oid_ops)); -DECLARE_UNIQUE_INDEX(pg_opclass_name_index on pg_opclass using btree(opcname name_ops)); +DECLARE_UNIQUE_INDEX(pg_opclass_am_name_index on pg_opclass using btree(opcamid oid_ops, opcname name_ops)); DECLARE_UNIQUE_INDEX(pg_opclass_oid_index on pg_opclass using btree(oid oid_ops)); DECLARE_UNIQUE_INDEX(pg_operator_oid_index on pg_operator using btree(oid oid_ops)); DECLARE_UNIQUE_INDEX(pg_operator_oprname_l_r_k_index on pg_operator using btree(oprname name_ops, oprleft oid_ops, oprright oid_ops, oprkind char_ops)); diff --git a/src/include/catalog/pg_amop.h b/src/include/catalog/pg_amop.h index 42adef9ad6..b630c824eb 100644 --- a/src/include/catalog/pg_amop.h +++ b/src/include/catalog/pg_amop.h @@ -4,11 +4,19 @@ * definition of the system "amop" relation (pg_amop) * along with the relation's initial contents. * + * The amop table identifies the operators associated with each index opclass. + * + * Note: the primary key for this table is <amopclaid, amopstrategy>. + * We also keep a unique index on <amopclaid, amopopr>, so that we can + * use a syscache to quickly answer questions of the form "is this operator + * in this opclass?". This implies that the same operator cannot be listed + * for multiple strategy numbers of a single opclass. + * * * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pg_amop.h,v 1.40 2001/08/13 18:45:36 tgl Exp $ + * $Id: pg_amop.h,v 1.41 2001/08/21 16:36:05 tgl Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -33,11 +41,10 @@ */ CATALOG(pg_amop) BKI_WITHOUT_OIDS { - Oid amopid; /* an index access method */ - Oid amopclaid; /* an index opclass */ - Oid amopopr; /* the operator OID to use */ - int2 amopstrategy; /* one of the strategy numbers defined by - * the AM */ + Oid amopclaid; /* the index opclass this entry is for */ + int2 amopstrategy; /* operator strategy number */ + bool amopreqcheck; /* index hit must be rechecked */ + Oid amopopr; /* the operator's pg_operator OID */ } FormData_pg_amop; /* ---------------- @@ -52,10 +59,10 @@ typedef FormData_pg_amop *Form_pg_amop; * ---------------- */ #define Natts_pg_amop 4 -#define Anum_pg_amop_amopid 1 -#define Anum_pg_amop_amopclaid 2 -#define Anum_pg_amop_amopopr 3 -#define Anum_pg_amop_amopstrategy 4 +#define Anum_pg_amop_amopclaid 1 +#define Anum_pg_amop_amopstrategy 2 +#define Anum_pg_amop_amopreqcheck 3 +#define Anum_pg_amop_amopopr 4 /* ---------------- * initial contents of pg_amop @@ -66,363 +73,345 @@ typedef FormData_pg_amop *Form_pg_amop; * rtree box_ops */ -DATA(insert ( 402 422 493 1 )); -DATA(insert ( 402 422 494 2 )); -DATA(insert ( 402 422 500 3 )); -DATA(insert ( 402 422 495 4 )); -DATA(insert ( 402 422 496 5 )); -DATA(insert ( 402 422 499 6 )); -DATA(insert ( 402 422 498 7 )); -DATA(insert ( 402 422 497 8 )); +DATA(insert ( 425 1 f 493 )); +DATA(insert ( 425 2 f 494 )); +DATA(insert ( 425 3 f 500 )); +DATA(insert ( 425 4 f 495 )); +DATA(insert ( 425 5 f 496 )); +DATA(insert ( 425 6 f 499 )); +DATA(insert ( 425 7 f 498 )); +DATA(insert ( 425 8 f 497 )); /* * rtree bigbox_ops */ -DATA(insert ( 402 433 493 1 )); -DATA(insert ( 402 433 494 2 )); -DATA(insert ( 402 433 500 3 )); -DATA(insert ( 402 433 495 4 )); -DATA(insert ( 402 433 496 5 )); -DATA(insert ( 402 433 499 6 )); -DATA(insert ( 402 433 498 7 )); -DATA(insert ( 402 433 497 8 )); +DATA(insert ( 422 1 f 493 )); +DATA(insert ( 422 2 f 494 )); +DATA(insert ( 422 3 f 500 )); +DATA(insert ( 422 4 f 495 )); +DATA(insert ( 422 5 f 496 )); +DATA(insert ( 422 6 f 499 )); +DATA(insert ( 422 7 f 498 )); +DATA(insert ( 422 8 f 497 )); /* * rtree poly_ops (supports polygons) */ -DATA(insert ( 402 434 485 1 )); -DATA(insert ( 402 434 486 2 )); -DATA(insert ( 402 434 492 3 )); -DATA(insert ( 402 434 487 4 )); -DATA(insert ( 402 434 488 5 )); -DATA(insert ( 402 434 491 6 )); -DATA(insert ( 402 434 490 7 )); -DATA(insert ( 402 434 489 8 )); - -/* - * rtree circle_ops (supports circles) - * - * XXX Diked out 2000-06-18 by tgl. Since we have no rtree support functions - * (union, intersection, size) for circles, we can't actually build rtree - * indexes on circles. These can be put back in someday if anyone ever - * writes such functions. - */ - -/* DATA(insert ( 402 714 1506 1 )); */ -/* DATA(insert ( 402 714 1507 2 )); */ -/* DATA(insert ( 402 714 1513 3 )); */ -/* DATA(insert ( 402 714 1508 4 )); */ -/* DATA(insert ( 402 714 1509 5 )); */ -/* DATA(insert ( 402 714 1512 6 )); */ -/* DATA(insert ( 402 714 1511 7 )); */ -/* DATA(insert ( 402 714 1510 8 )); */ +DATA(insert ( 1993 1 f 485 )); +DATA(insert ( 1993 2 f 486 )); +DATA(insert ( 1993 3 f 492 )); +DATA(insert ( 1993 4 f 487 )); +DATA(insert ( 1993 5 f 488 )); +DATA(insert ( 1993 6 f 491 )); +DATA(insert ( 1993 7 f 490 )); +DATA(insert ( 1993 8 f 489 )); /* - * nbtree int2_ops + * btree int2_ops */ -DATA(insert ( 403 421 95 1 )); -DATA(insert ( 403 421 522 2 )); -DATA(insert ( 403 421 94 3 )); -DATA(insert ( 403 421 524 4 )); -DATA(insert ( 403 421 520 5 )); +DATA(insert ( 1976 1 f 95 )); +DATA(insert ( 1976 2 f 522 )); +DATA(insert ( 1976 3 f 94 )); +DATA(insert ( 1976 4 f 524 )); +DATA(insert ( 1976 5 f 520 )); /* - * nbtree float8_ops + * btree int4_ops */ -DATA(insert ( 403 423 672 1 )); -DATA(insert ( 403 423 673 2 )); -DATA(insert ( 403 423 670 3 )); -DATA(insert ( 403 423 675 4 )); -DATA(insert ( 403 423 674 5 )); +DATA(insert ( 1978 1 f 97 )); +DATA(insert ( 1978 2 f 523 )); +DATA(insert ( 1978 3 f 96 )); +DATA(insert ( 1978 4 f 525 )); +DATA(insert ( 1978 5 f 521 )); /* - * nbtree int4_ops + * btree int8_ops */ -DATA(insert ( 403 426 97 1 )); -DATA(insert ( 403 426 523 2 )); -DATA(insert ( 403 426 96 3 )); -DATA(insert ( 403 426 525 4 )); -DATA(insert ( 403 426 521 5 )); +DATA(insert ( 1980 1 f 412 )); +DATA(insert ( 1980 2 f 414 )); +DATA(insert ( 1980 3 f 410 )); +DATA(insert ( 1980 4 f 415 )); +DATA(insert ( 1980 5 f 413 )); /* - * nbtree int8_ops + * btree oid_ops */ -DATA(insert ( 403 754 412 1 )); -DATA(insert ( 403 754 414 2 )); -DATA(insert ( 403 754 410 3 )); -DATA(insert ( 403 754 415 4 )); -DATA(insert ( 403 754 413 5 )); +DATA(insert ( 1989 1 f 609 )); +DATA(insert ( 1989 2 f 611 )); +DATA(insert ( 1989 3 f 607 )); +DATA(insert ( 1989 4 f 612 )); +DATA(insert ( 1989 5 f 610 )); /* - * nbtree oid_ops + * btree oidvector_ops */ -DATA(insert ( 403 427 609 1 )); -DATA(insert ( 403 427 611 2 )); -DATA(insert ( 403 427 607 3 )); -DATA(insert ( 403 427 612 4 )); -DATA(insert ( 403 427 610 5 )); +DATA(insert ( 1991 1 f 645 )); +DATA(insert ( 1991 2 f 647 )); +DATA(insert ( 1991 3 f 649 )); +DATA(insert ( 1991 4 f 648 )); +DATA(insert ( 1991 5 f 646 )); /* - * nbtree oidvector_ops + * btree float4_ops */ -DATA(insert ( 403 435 645 1 )); -DATA(insert ( 403 435 647 2 )); -DATA(insert ( 403 435 649 3 )); -DATA(insert ( 403 435 648 4 )); -DATA(insert ( 403 435 646 5 )); +DATA(insert ( 1970 1 f 622 )); +DATA(insert ( 1970 2 f 624 )); +DATA(insert ( 1970 3 f 620 )); +DATA(insert ( 1970 4 f 625 )); +DATA(insert ( 1970 5 f 623 )); /* - * nbtree float4_ops + * btree float8_ops */ -DATA(insert ( 403 428 622 1 )); -DATA(insert ( 403 428 624 2 )); -DATA(insert ( 403 428 620 3 )); -DATA(insert ( 403 428 625 4 )); -DATA(insert ( 403 428 623 5 )); +DATA(insert ( 1972 1 f 672 )); +DATA(insert ( 1972 2 f 673 )); +DATA(insert ( 1972 3 f 670 )); +DATA(insert ( 1972 4 f 675 )); +DATA(insert ( 1972 5 f 674 )); /* - * nbtree char_ops + * btree char_ops */ -DATA(insert ( 403 429 631 1 )); -DATA(insert ( 403 429 632 2 )); -DATA(insert ( 403 429 92 3 )); -DATA(insert ( 403 429 634 4 )); -DATA(insert ( 403 429 633 5 )); +DATA(insert ( 429 1 f 631 )); +DATA(insert ( 429 2 f 632 )); +DATA(insert ( 429 3 f 92 )); +DATA(insert ( 429 4 f 634 )); +DATA(insert ( 429 5 f 633 )); /* - * nbtree name_ops + * btree name_ops */ -DATA(insert ( 403 1181 660 1 )); -DATA(insert ( 403 1181 661 2 )); -DATA(insert ( 403 1181 93 3 )); -DATA(insert ( 403 1181 663 4 )); -DATA(insert ( 403 1181 662 5 )); +DATA(insert ( 1986 1 f 660 )); +DATA(insert ( 1986 2 f 661 )); +DATA(insert ( 1986 3 f 93 )); +DATA(insert ( 1986 4 f 663 )); +DATA(insert ( 1986 5 f 662 )); /* - * nbtree text_ops + * btree text_ops */ -DATA(insert ( 403 431 664 1 )); -DATA(insert ( 403 431 665 2 )); -DATA(insert ( 403 431 98 3 )); -DATA(insert ( 403 431 667 4 )); -DATA(insert ( 403 431 666 5 )); +DATA(insert ( 1994 1 f 664 )); +DATA(insert ( 1994 2 f 665 )); +DATA(insert ( 1994 3 f 98 )); +DATA(insert ( 1994 4 f 667 )); +DATA(insert ( 1994 5 f 666 )); /* - * nbtree abstime_ops + * btree bpchar_ops */ -DATA(insert ( 403 432 562 1 )); -DATA(insert ( 403 432 564 2 )); -DATA(insert ( 403 432 560 3 )); -DATA(insert ( 403 432 565 4 )); -DATA(insert ( 403 432 563 5 )); +DATA(insert ( 426 1 f 1058 )); +DATA(insert ( 426 2 f 1059 )); +DATA(insert ( 426 3 f 1054 )); +DATA(insert ( 426 4 f 1061 )); +DATA(insert ( 426 5 f 1060 )); /* - * nbtree bpchar_ops + * btree varchar_ops */ -DATA(insert ( 403 1076 1058 1 )); -DATA(insert ( 403 1076 1059 2 )); -DATA(insert ( 403 1076 1054 3 )); -DATA(insert ( 403 1076 1061 4 )); -DATA(insert ( 403 1076 1060 5 )); +DATA(insert ( 2003 1 f 1066 )); +DATA(insert ( 2003 2 f 1067 )); +DATA(insert ( 2003 3 f 1062 )); +DATA(insert ( 2003 4 f 1069 )); +DATA(insert ( 2003 5 f 1068 )); /* - * nbtree varchar_ops + * btree bytea_ops */ -DATA(insert ( 403 1077 1066 1 )); -DATA(insert ( 403 1077 1067 2 )); -DATA(insert ( 403 1077 1062 3 )); -DATA(insert ( 403 1077 1069 4 )); -DATA(insert ( 403 1077 1068 5 )); +DATA(insert ( 428 1 f 1957 )); +DATA(insert ( 428 2 f 1958 )); +DATA(insert ( 428 3 f 1955 )); +DATA(insert ( 428 4 f 1960 )); +DATA(insert ( 428 5 f 1959 )); /* - * nbtree bytea_ops + * btree abstime_ops */ -DATA(insert ( 403 1961 1957 1 )); -DATA(insert ( 403 1961 1958 2 )); -DATA(insert ( 403 1961 1955 3 )); -DATA(insert ( 403 1961 1960 4 )); -DATA(insert ( 403 1961 1959 5 )); +DATA(insert ( 421 1 f 562 )); +DATA(insert ( 421 2 f 564 )); +DATA(insert ( 421 3 f 560 )); +DATA(insert ( 421 4 f 565 )); +DATA(insert ( 421 5 f 563 )); /* - * nbtree date_ops + * btree date_ops */ -DATA(insert ( 403 1114 1095 1 )); -DATA(insert ( 403 1114 1096 2 )); -DATA(insert ( 403 1114 1093 3 )); -DATA(insert ( 403 1114 1098 4 )); -DATA(insert ( 403 1114 1097 5 )); +DATA(insert ( 434 1 f 1095 )); +DATA(insert ( 434 2 f 1096 )); +DATA(insert ( 434 3 f 1093 )); +DATA(insert ( 434 4 f 1098 )); +DATA(insert ( 434 5 f 1097 )); /* - * nbtree time_ops + * btree time_ops */ -DATA(insert ( 403 1115 1110 1 )); -DATA(insert ( 403 1115 1111 2 )); -DATA(insert ( 403 1115 1108 3 )); -DATA(insert ( 403 1115 1113 4 )); -DATA(insert ( 403 1115 1112 5 )); +DATA(insert ( 1996 1 f 1110 )); +DATA(insert ( 1996 2 f 1111 )); +DATA(insert ( 1996 3 f 1108 )); +DATA(insert ( 1996 4 f 1113 )); +DATA(insert ( 1996 5 f 1112 )); /* - * nbtree timetz_ops + * btree timetz_ops */ -DATA(insert ( 403 1399 1552 1 )); -DATA(insert ( 403 1399 1553 2 )); -DATA(insert ( 403 1399 1550 3 )); -DATA(insert ( 403 1399 1555 4 )); -DATA(insert ( 403 1399 1554 5 )); +DATA(insert ( 2000 1 f 1552 )); +DATA(insert ( 2000 2 f 1553 )); +DATA(insert ( 2000 3 f 1550 )); +DATA(insert ( 2000 4 f 1555 )); +DATA(insert ( 2000 5 f 1554 )); /* - * nbtree timestamp_ops + * btree timestamp_ops */ -DATA(insert ( 403 1312 1322 1 )); -DATA(insert ( 403 1312 1323 2 )); -DATA(insert ( 403 1312 1320 3 )); -DATA(insert ( 403 1312 1325 4 )); -DATA(insert ( 403 1312 1324 5 )); +DATA(insert ( 1998 1 f 1322 )); +DATA(insert ( 1998 2 f 1323 )); +DATA(insert ( 1998 3 f 1320 )); +DATA(insert ( 1998 4 f 1325 )); +DATA(insert ( 1998 5 f 1324 )); /* - * nbtree interval_ops + * btree interval_ops */ -DATA(insert ( 403 1313 1332 1 )); -DATA(insert ( 403 1313 1333 2 )); -DATA(insert ( 403 1313 1330 3 )); -DATA(insert ( 403 1313 1335 4 )); -DATA(insert ( 403 1313 1334 5 )); +DATA(insert ( 1982 1 f 1332 )); +DATA(insert ( 1982 2 f 1333 )); +DATA(insert ( 1982 3 f 1330 )); +DATA(insert ( 1982 4 f 1335 )); +DATA(insert ( 1982 5 f 1334 )); /* - * nbtree macaddr + * btree macaddr */ -DATA(insert ( 403 810 1222 1 )); -DATA(insert ( 403 810 1223 2 )); -DATA(insert ( 403 810 1220 3 )); -DATA(insert ( 403 810 1225 4 )); -DATA(insert ( 403 810 1224 5 )); +DATA(insert ( 1984 1 f 1222 )); +DATA(insert ( 1984 2 f 1223 )); +DATA(insert ( 1984 3 f 1220 )); +DATA(insert ( 1984 4 f 1225 )); +DATA(insert ( 1984 5 f 1224 )); /* - * nbtree inet + * btree inet */ -DATA(insert ( 403 935 1203 1 )); -DATA(insert ( 403 935 1204 2 )); -DATA(insert ( 403 935 1201 3 )); -DATA(insert ( 403 935 1206 4 )); -DATA(insert ( 403 935 1205 5 )); +DATA(insert ( 1974 1 f 1203 )); +DATA(insert ( 1974 2 f 1204 )); +DATA(insert ( 1974 3 f 1201 )); +DATA(insert ( 1974 4 f 1206 )); +DATA(insert ( 1974 5 f 1205 )); /* - * nbtree cidr + * btree cidr */ -DATA(insert ( 403 652 822 1 )); -DATA(insert ( 403 652 823 2 )); -DATA(insert ( 403 652 820 3 )); -DATA(insert ( 403 652 825 4 )); -DATA(insert ( 403 652 824 5 )); +DATA(insert ( 432 1 f 822 )); +DATA(insert ( 432 2 f 823 )); +DATA(insert ( 432 3 f 820 )); +DATA(insert ( 432 4 f 825 )); +DATA(insert ( 432 5 f 824 )); /* - * nbtree numeric + * btree numeric */ -DATA(insert ( 403 1768 1754 1 )); -DATA(insert ( 403 1768 1755 2 )); -DATA(insert ( 403 1768 1752 3 )); -DATA(insert ( 403 1768 1757 4 )); -DATA(insert ( 403 1768 1756 5 )); +DATA(insert ( 1988 1 f 1754 )); +DATA(insert ( 1988 2 f 1755 )); +DATA(insert ( 1988 3 f 1752 )); +DATA(insert ( 1988 4 f 1757 )); +DATA(insert ( 1988 5 f 1756 )); /* - * nbtree bool + * btree bool */ -DATA(insert ( 403 1690 58 1 )); -DATA(insert ( 403 1690 1694 2 )); -DATA(insert ( 403 1690 91 3 )); -DATA(insert ( 403 1690 1695 4 )); -DATA(insert ( 403 1690 59 5 )); +DATA(insert ( 424 1 f 58 )); +DATA(insert ( 424 2 f 1694 )); +DATA(insert ( 424 3 f 91 )); +DATA(insert ( 424 4 f 1695 )); +DATA(insert ( 424 5 f 59 )); /* - * nbtree bit + * btree bit */ -DATA(insert ( 403 424 1786 1 )); -DATA(insert ( 403 424 1788 2 )); -DATA(insert ( 403 424 1784 3 )); -DATA(insert ( 403 424 1789 4 )); -DATA(insert ( 403 424 1787 5 )); +DATA(insert ( 423 1 f 1786 )); +DATA(insert ( 423 2 f 1788 )); +DATA(insert ( 423 3 f 1784 )); +DATA(insert ( 423 4 f 1789 )); +DATA(insert ( 423 5 f 1787 )); /* - * nbtree varbit + * btree varbit */ -DATA(insert ( 403 425 1806 1 )); -DATA(insert ( 403 425 1808 2 )); -DATA(insert ( 403 425 1804 3 )); -DATA(insert ( 403 425 1809 4 )); -DATA(insert ( 403 425 1807 5 )); +DATA(insert ( 2002 1 f 1806 )); +DATA(insert ( 2002 2 f 1808 )); +DATA(insert ( 2002 3 f 1804 )); +DATA(insert ( 2002 4 f 1809 )); +DATA(insert ( 2002 5 f 1807 )); /* - * hash table _ops + * hash index _ops */ -/* int2_ops */ -DATA(insert ( 405 421 94 1 )); +/* bpchar_ops */ +DATA(insert ( 427 1 f 1054 )); +/* char_ops */ +DATA(insert ( 431 1 f 92 )); +/* cidr_ops */ +DATA(insert ( 433 1 f 820 )); +/* date_ops */ +DATA(insert ( 435 1 f 1093 )); +/* float4_ops */ +DATA(insert ( 1971 1 f 620 )); /* float8_ops */ -DATA(insert ( 405 423 670 1 )); +DATA(insert ( 1973 1 f 670 )); +/* inet_ops */ +DATA(insert ( 1975 1 f 1201 )); +/* int2_ops */ +DATA(insert ( 1977 1 f 94 )); /* int4_ops */ -DATA(insert ( 405 426 96 1 )); +DATA(insert ( 1979 1 f 96 )); /* int8_ops */ -DATA(insert ( 405 754 410 1 )); +DATA(insert ( 1981 1 f 410 )); +/* interval_ops */ +DATA(insert ( 1983 1 f 1330 )); +/* macaddr_ops */ +DATA(insert ( 1985 1 f 1220 )); +/* name_ops */ +DATA(insert ( 1987 1 f 93 )); /* oid_ops */ -DATA(insert ( 405 427 607 1 )); +DATA(insert ( 1990 1 f 607 )); /* oidvector_ops */ -DATA(insert ( 405 435 649 1 )); -/* float4_ops */ -DATA(insert ( 405 428 620 1 )); -/* char_ops */ -DATA(insert ( 405 429 92 1 )); -/* name_ops */ -DATA(insert ( 405 1181 93 1 )); +DATA(insert ( 1992 1 f 649 )); /* text_ops */ -DATA(insert ( 405 431 98 1 )); -/* bpchar_ops */ -DATA(insert ( 405 1076 1054 1 )); -/* varchar_ops */ -DATA(insert ( 405 1077 1062 1 )); -/* date_ops */ -DATA(insert ( 405 1114 1093 1 )); +DATA(insert ( 1995 1 f 98 )); /* time_ops */ -DATA(insert ( 405 1115 1108 1 )); -/* timetz_ops */ -DATA(insert ( 405 1399 1550 1 )); +DATA(insert ( 1997 1 f 1108 )); /* timestamp_ops */ -DATA(insert ( 405 1312 1320 1 )); -/* interval_ops */ -DATA(insert ( 405 1313 1330 1 )); -/* macaddr_ops */ -DATA(insert ( 405 810 1220 1 )); -/* inet_ops */ -DATA(insert ( 405 935 1201 1 )); -/* cidr_ops */ -DATA(insert ( 405 652 820 1 )); +DATA(insert ( 1999 1 f 1320 )); +/* timetz_ops */ +DATA(insert ( 2001 1 f 1550 )); +/* varchar_ops */ +DATA(insert ( 2004 1 f 1062 )); #endif /* PG_AMOP_H */ diff --git a/src/include/catalog/pg_amproc.h b/src/include/catalog/pg_amproc.h index d3639becc5..e802c6fd10 100644 --- a/src/include/catalog/pg_amproc.h +++ b/src/include/catalog/pg_amproc.h @@ -2,15 +2,19 @@ * * pg_amproc.h * definition of the system "amproc" relation (pg_amproc) - * along with the relation's initial contents. The amproc - * catalog is used to store procedures used by index access - * methods that aren't associated with operators. + * along with the relation's initial contents. + * + * The amproc table identifies support procedures associated with index + * opclasses. These procedures can't be listed in pg_amop since they are + * not associated with indexable operators for the opclass. + * + * Note: the primary key for this table is <amopclaid, amprocnum>. * * * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pg_amproc.h,v 1.29 2001/08/13 18:45:36 tgl Exp $ + * $Id: pg_amproc.h,v 1.30 2001/08/21 16:36:05 tgl Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -35,10 +39,9 @@ */ CATALOG(pg_amproc) BKI_WITHOUT_OIDS { - Oid amid; /* the access method this proc is for */ - Oid amopclaid; /* the opclass this proc is for */ - Oid amproc; /* OID of the proc */ + Oid amopclaid; /* the index opclass this entry is for */ int2 amprocnum; /* support procedure index */ + regproc amproc; /* OID of the proc */ } FormData_pg_amproc; /* ---------------- @@ -52,11 +55,10 @@ typedef FormData_pg_amproc *Form_pg_amproc; * compiler constants for pg_amproc * ---------------- */ -#define Natts_pg_amproc 4 -#define Anum_pg_amproc_amid 1 -#define Anum_pg_amproc_amopclaid 2 +#define Natts_pg_amproc 3 +#define Anum_pg_amproc_amopclaid 1 +#define Anum_pg_amproc_amprocnum 2 #define Anum_pg_amproc_amproc 3 -#define Anum_pg_amproc_amprocnum 4 /* ---------------- * initial contents of pg_amproc @@ -64,66 +66,66 @@ typedef FormData_pg_amproc *Form_pg_amproc; */ /* rtree */ -DATA(insert (402 422 193 1)); -DATA(insert (402 422 194 2)); -DATA(insert (402 422 195 3)); -DATA(insert (402 433 193 1)); -DATA(insert (402 433 194 2)); -DATA(insert (402 433 196 3)); -DATA(insert (402 434 197 1)); -DATA(insert (402 434 198 2)); -DATA(insert (402 434 199 3)); +DATA(insert ( 422 1 193 )); +DATA(insert ( 422 2 194 )); +DATA(insert ( 422 3 196 )); +DATA(insert ( 425 1 193 )); +DATA(insert ( 425 2 194 )); +DATA(insert ( 425 3 195 )); +DATA(insert ( 1993 1 197 )); +DATA(insert ( 1993 2 198 )); +DATA(insert ( 1993 3 199 )); /* btree */ -DATA(insert (403 421 350 1)); -DATA(insert (403 423 355 1)); -DATA(insert (403 426 351 1)); -DATA(insert (403 427 356 1)); -DATA(insert (403 428 354 1)); -DATA(insert (403 429 358 1)); -DATA(insert (403 431 360 1)); -DATA(insert (403 432 357 1)); -DATA(insert (403 435 404 1)); -DATA(insert (403 754 842 1)); -DATA(insert (403 1076 1078 1)); -DATA(insert (403 1077 1079 1)); -DATA(insert (403 1114 1092 1)); -DATA(insert (403 1115 1107 1)); -DATA(insert (403 1181 359 1)); -DATA(insert (403 1312 1314 1)); -DATA(insert (403 1313 1315 1)); -DATA(insert (403 810 836 1)); -DATA(insert (403 935 926 1)); -DATA(insert (403 652 926 1)); -DATA(insert (403 1768 1769 1)); -DATA(insert (403 1690 1693 1)); -DATA(insert (403 1399 1358 1)); -DATA(insert (403 424 1596 1)); -DATA(insert (403 425 1672 1)); -DATA(insert (403 1961 1954 1)); +DATA(insert ( 421 1 357 )); +DATA(insert ( 423 1 1596 )); +DATA(insert ( 424 1 1693 )); +DATA(insert ( 426 1 1078 )); +DATA(insert ( 428 1 1954 )); +DATA(insert ( 429 1 358 )); +DATA(insert ( 432 1 926 )); +DATA(insert ( 434 1 1092 )); +DATA(insert ( 1970 1 354 )); +DATA(insert ( 1972 1 355 )); +DATA(insert ( 1974 1 926 )); +DATA(insert ( 1976 1 350 )); +DATA(insert ( 1978 1 351 )); +DATA(insert ( 1980 1 842 )); +DATA(insert ( 1982 1 1315 )); +DATA(insert ( 1984 1 836 )); +DATA(insert ( 1986 1 359 )); +DATA(insert ( 1988 1 1769 )); +DATA(insert ( 1989 1 356 )); +DATA(insert ( 1991 1 404 )); +DATA(insert ( 1994 1 360 )); +DATA(insert ( 1996 1 1107 )); +DATA(insert ( 1998 1 1314 )); +DATA(insert ( 2000 1 1358 )); +DATA(insert ( 2002 1 1672 )); +DATA(insert ( 2003 1 1079 )); /* hash */ -DATA(insert (405 421 449 1)); -DATA(insert (405 423 452 1)); -DATA(insert (405 426 450 1)); -DATA(insert (405 427 453 1)); -DATA(insert (405 428 451 1)); -DATA(insert (405 429 454 1)); -DATA(insert (405 431 456 1)); -DATA(insert (405 435 457 1)); -DATA(insert (405 652 456 1)); -DATA(insert (405 754 949 1)); -DATA(insert (405 810 399 1)); -DATA(insert (405 935 456 1)); -DATA(insert (405 1076 1080 1)); -DATA(insert (405 1077 456 1)); -DATA(insert (405 1114 450 1)); -DATA(insert (405 1115 452 1)); -DATA(insert (405 1181 455 1)); -DATA(insert (405 1312 452 1)); -DATA(insert (405 1313 1697 1)); -DATA(insert (405 1399 1696 1)); +DATA(insert ( 427 1 1080 )); +DATA(insert ( 431 1 454 )); +DATA(insert ( 433 1 456 )); +DATA(insert ( 435 1 450 )); +DATA(insert ( 1971 1 451 )); +DATA(insert ( 1973 1 452 )); +DATA(insert ( 1975 1 456 )); +DATA(insert ( 1977 1 449 )); +DATA(insert ( 1979 1 450 )); +DATA(insert ( 1981 1 949 )); +DATA(insert ( 1983 1 1697 )); +DATA(insert ( 1985 1 399 )); +DATA(insert ( 1987 1 455 )); +DATA(insert ( 1990 1 453 )); +DATA(insert ( 1992 1 457 )); +DATA(insert ( 1995 1 456 )); +DATA(insert ( 1997 1 452 )); +DATA(insert ( 1999 1 452 )); +DATA(insert ( 2001 1 1696 )); +DATA(insert ( 2004 1 456 )); #endif /* PG_AMPROC_H */ diff --git a/src/include/catalog/pg_index.h b/src/include/catalog/pg_index.h index e50b84ffd0..6fed33c862 100644 --- a/src/include/catalog/pg_index.h +++ b/src/include/catalog/pg_index.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pg_index.h,v 1.23 2001/08/10 18:57:40 tgl Exp $ + * $Id: pg_index.h,v 1.24 2001/08/21 16:36:05 tgl Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -28,35 +28,21 @@ /* ---------------- * pg_index definition. cpp turns this into - * typedef struct FormData_pg_index. The oid of the index relation - * is stored in indexrelid; the oid of the indexed relation is stored - * in indrelid. + * typedef struct FormData_pg_index. * ---------------- */ - -/* - * it seems that all variable length fields should go at the _end_, - * because the system cache routines only copy the fields up to the - * first variable length field. so I moved indislossy, indhaskeytype, - * and indisunique before indpred. --djm 8/20/96 - */ CATALOG(pg_index) BKI_WITHOUT_OIDS { Oid indexrelid; /* OID of the index */ Oid indrelid; /* OID of the relation it indexes */ - Oid indproc; /* OID of function for functional index */ + regproc indproc; /* OID of function for functional index */ int2vector indkey; /* column numbers of indexed attributes */ oidvector indclass; /* opclass identifiers */ - bool indisclustered; /* unused */ - bool indislossy; /* index hit must be reevaluated against heap - * value to make sure it really is match; - * typically used by hash. - */ - bool indhaskeytype; /* not used, originally added by GIST */ + bool indisclustered; /* presently unused */ bool indisunique; /* is this a unique index? */ - bool indisprimary; /* is this index for primary key */ + bool indisprimary; /* is this index for primary key? */ Oid indreference; /* oid of index of referenced relation (ie - * - this index for foreign key */ + * - this index for foreign key) */ /* VARIABLE LENGTH FIELD: */ text indpred; /* expression tree for predicate, * if a partial index */ @@ -73,18 +59,16 @@ typedef FormData_pg_index *Form_pg_index; * compiler constants for pg_index * ---------------- */ -#define Natts_pg_index 12 +#define Natts_pg_index 10 #define Anum_pg_index_indexrelid 1 #define Anum_pg_index_indrelid 2 #define Anum_pg_index_indproc 3 #define Anum_pg_index_indkey 4 #define Anum_pg_index_indclass 5 #define Anum_pg_index_indisclustered 6 -#define Anum_pg_index_indislossy 7 -#define Anum_pg_index_indhaskeytype 8 -#define Anum_pg_index_indisunique 9 -#define Anum_pg_index_indisprimary 10 -#define Anum_pg_index_indreference 11 -#define Anum_pg_index_indpred 12 +#define Anum_pg_index_indisunique 7 +#define Anum_pg_index_indisprimary 8 +#define Anum_pg_index_indreference 9 +#define Anum_pg_index_indpred 10 #endif /* PG_INDEX_H */ diff --git a/src/include/catalog/pg_opclass.h b/src/include/catalog/pg_opclass.h index 77adfc9121..0b3b91758c 100644 --- a/src/include/catalog/pg_opclass.h +++ b/src/include/catalog/pg_opclass.h @@ -4,11 +4,29 @@ * definition of the system "opclass" relation (pg_opclass) * along with the relation's initial contents. * + * New definition for Postgres 7.2: the primary key for this table is + * <opcamid, opcname> --- that is, there is a row for each valid combination + * of opclass name and index access method type. This row specifies the + * expected input data type for the opclass (the type of the heap column, + * or the function output type in the case of a functional index). Note + * that types binary-compatible with the specified type will be accepted too. + * + * For a given <opcamid, opcintype> pair, there can be at most one row that + * has opcdefault = true; this row is the default opclass for such data in + * such an index. + * + * Normally opckeytype = InvalidOid (zero), indicating that the data stored + * in the index is the same as the input data. If opckeytype is nonzero + * then it indicates that a conversion step is needed to produce the stored + * index data, which will be of type opckeytype (which might be the same or + * different from the input data). Performing such a conversion is the + * responsibility of the index access method --- not all AMs support this. + * * * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pg_opclass.h,v 1.38 2001/08/13 18:45:36 tgl Exp $ + * $Id: pg_opclass.h,v 1.39 2001/08/21 16:36:05 tgl Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -34,8 +52,11 @@ CATALOG(pg_opclass) { - NameData opcname; /* name of opclass defined by this row */ - Oid opcdeftype; /* type that opclass is default for, or 0 */ + Oid opcamid; /* index access method opclass is for */ + NameData opcname; /* name of this opclass */ + Oid opcintype; /* type of input data for opclass */ + bool opcdefault; /* T if opclass is default for opcintype */ + Oid opckeytype; /* type of index data, or InvalidOid */ } FormData_pg_opclass; /* ---------------- @@ -49,81 +70,69 @@ typedef FormData_pg_opclass *Form_pg_opclass; * compiler constants for pg_opclass * ---------------- */ -#define Natts_pg_opclass 2 -#define Anum_pg_opclass_opcname 1 -#define Anum_pg_opclass_opcdeftype 2 +#define Natts_pg_opclass 5 +#define Anum_pg_opclass_opcamid 1 +#define Anum_pg_opclass_opcname 2 +#define Anum_pg_opclass_opcintype 3 +#define Anum_pg_opclass_opcdefault 4 +#define Anum_pg_opclass_opckeytype 5 /* ---------------- * initial contents of pg_opclass * ---------------- */ -/* - * putting _null_'s in the (fixed-length) type field is bad - * (see the README in this directory), so just put zeros - * in, which are invalid OID's anyway. --djm - */ -DATA(insert OID = 421 ( int2_ops 21 )); -DESCR(""); -DATA(insert OID = 422 ( box_ops 603 )); -DESCR(""); -DATA(insert OID = 423 ( float8_ops 701 )); -DESCR(""); -DATA(insert OID = 426 ( int4_ops 23 )); -DESCR(""); -#define INT4_OPS_OID 426 -DATA(insert OID = 427 ( oid_ops 26 )); -DESCR(""); -#define OID_OPS_OID 427 -DATA(insert OID = 428 ( float4_ops 700 )); -DESCR(""); -DATA(insert OID = 429 ( char_ops 18 )); -DESCR(""); -DATA(insert OID = 431 ( text_ops 25 )); -DESCR(""); -DATA(insert OID = 432 ( abstime_ops 702 )); -DESCR(""); -DATA(insert OID = 433 ( bigbox_ops 0 )); -DESCR(""); -DATA(insert OID = 434 ( poly_ops 604 )); -DESCR(""); -DATA(insert OID = 435 ( oidvector_ops 30 )); -DESCR(""); -DATA(insert OID = 714 ( circle_ops 718 )); -DESCR(""); -DATA(insert OID = 754 ( int8_ops 20 )); -DESCR(""); -DATA(insert OID = 1076 ( bpchar_ops 1042 )); -DESCR(""); -DATA(insert OID = 1077 ( varchar_ops 1043 )); -DESCR(""); -DATA(insert OID = 1114 ( date_ops 1082 )); -DESCR(""); -DATA(insert OID = 1115 ( time_ops 1083 )); -DESCR(""); -DATA(insert OID = 1181 ( name_ops 19 )); -DESCR(""); -DATA(insert OID = 1312 ( timestamp_ops 1184 )); -DESCR(""); -DATA(insert OID = 1313 ( interval_ops 1186 )); -DESCR(""); -DATA(insert OID = 810 ( macaddr_ops 829 )); -DESCR(""); -DATA(insert OID = 935 ( inet_ops 869 )); -DESCR(""); -DATA(insert OID = 652 ( cidr_ops 650 )); -DESCR(""); -DATA(insert OID = 1768 ( numeric_ops 1700 )); -DESCR(""); -DATA(insert OID = 1690 ( bool_ops 16 )); -DESCR(""); -DATA(insert OID = 1399 ( timetz_ops 1266 )); -DESCR(""); -DATA(insert OID = 424 ( bit_ops 1560 )); -DESCR(""); -DATA(insert OID = 425 ( varbit_ops 1562 )); -DESCR(""); -DATA(insert OID = 1961 ( bytea_ops 17 )); -DESCR(""); +DATA(insert OID = 421 ( 403 abstime_ops 702 t 0 )); +DATA(insert OID = 422 ( 402 bigbox_ops 603 f 0 )); +DATA(insert OID = 423 ( 403 bit_ops 1560 t 0 )); +DATA(insert OID = 424 ( 403 bool_ops 16 t 0 )); +DATA(insert OID = 425 ( 402 box_ops 603 t 0 )); +DATA(insert OID = 426 ( 403 bpchar_ops 1042 t 0 )); +DATA(insert OID = 427 ( 405 bpchar_ops 1042 t 0 )); +DATA(insert OID = 428 ( 403 bytea_ops 17 t 0 )); +DATA(insert OID = 429 ( 403 char_ops 18 t 0 )); +DATA(insert OID = 431 ( 405 char_ops 18 t 0 )); +DATA(insert OID = 432 ( 403 cidr_ops 650 t 0 )); +DATA(insert OID = 433 ( 405 cidr_ops 650 t 0 )); +DATA(insert OID = 434 ( 403 date_ops 1082 t 0 )); +DATA(insert OID = 435 ( 405 date_ops 1082 t 0 )); +DATA(insert OID = 1970 ( 403 float4_ops 700 t 0 )); +DATA(insert OID = 1971 ( 405 float4_ops 700 t 0 )); +DATA(insert OID = 1972 ( 403 float8_ops 701 t 0 )); +DATA(insert OID = 1973 ( 405 float8_ops 701 t 0 )); +DATA(insert OID = 1974 ( 403 inet_ops 869 t 0 )); +DATA(insert OID = 1975 ( 405 inet_ops 869 t 0 )); +DATA(insert OID = 1976 ( 403 int2_ops 21 t 0 )); +#define INT2_BTREE_OPS_OID 1976 +DATA(insert OID = 1977 ( 405 int2_ops 21 t 0 )); +DATA(insert OID = 1978 ( 403 int4_ops 23 t 0 )); +#define INT4_BTREE_OPS_OID 1978 +DATA(insert OID = 1979 ( 405 int4_ops 23 t 0 )); +DATA(insert OID = 1980 ( 403 int8_ops 20 t 0 )); +DATA(insert OID = 1981 ( 405 int8_ops 20 t 0 )); +DATA(insert OID = 1982 ( 403 interval_ops 1186 t 0 )); +DATA(insert OID = 1983 ( 405 interval_ops 1186 t 0 )); +DATA(insert OID = 1984 ( 403 macaddr_ops 829 t 0 )); +DATA(insert OID = 1985 ( 405 macaddr_ops 829 t 0 )); +DATA(insert OID = 1986 ( 403 name_ops 19 t 0 )); +DATA(insert OID = 1987 ( 405 name_ops 19 t 0 )); +DATA(insert OID = 1988 ( 403 numeric_ops 1700 t 0 )); +DATA(insert OID = 1989 ( 403 oid_ops 26 t 0 )); +#define OID_BTREE_OPS_OID 1989 +DATA(insert OID = 1990 ( 405 oid_ops 26 t 0 )); +DATA(insert OID = 1991 ( 403 oidvector_ops 30 t 0 )); +DATA(insert OID = 1992 ( 405 oidvector_ops 30 t 0 )); +DATA(insert OID = 1993 ( 402 poly_ops 604 t 0 )); +DATA(insert OID = 1994 ( 403 text_ops 25 t 0 )); +DATA(insert OID = 1995 ( 405 text_ops 25 t 0 )); +DATA(insert OID = 1996 ( 403 time_ops 1083 t 0 )); +DATA(insert OID = 1997 ( 405 time_ops 1083 t 0 )); +DATA(insert OID = 1998 ( 403 timestamp_ops 1184 t 0 )); +DATA(insert OID = 1999 ( 405 timestamp_ops 1184 t 0 )); +DATA(insert OID = 2000 ( 403 timetz_ops 1266 t 0 )); +DATA(insert OID = 2001 ( 405 timetz_ops 1266 t 0 )); +DATA(insert OID = 2002 ( 403 varbit_ops 1562 t 0 )); +DATA(insert OID = 2003 ( 403 varchar_ops 1043 t 0 )); +DATA(insert OID = 2004 ( 405 varchar_ops 1043 t 0 )); #endif /* PG_OPCLASS_H */ diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h index 47230e9144..88c8a93135 100644 --- a/src/include/commands/defrem.h +++ b/src/include/commands/defrem.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: defrem.h,v 1.23 2001/07/16 05:07:00 tgl Exp $ + * $Id: defrem.h,v 1.24 2001/08/21 16:36:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -24,7 +24,6 @@ extern void DefineIndex(char *heapRelationName, char *indexRelationName, char *accessMethodName, List *attributeList, - List *parameterList, bool unique, bool primary, Expr *predicate, diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index e6752a9efc..a961cb5af4 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: parsenodes.h,v 1.141 2001/08/16 20:38:55 tgl Exp $ + * $Id: parsenodes.h,v 1.142 2001/08/21 16:36:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -500,7 +500,6 @@ typedef struct IndexStmt char *relname; /* name of relation to index on */ char *accessMethod; /* name of access method (eg. btree) */ List *indexParams; /* a list of IndexElem */ - List *withClause; /* a list of DefElem */ Node *whereClause; /* qualification (partial-index predicate) */ List *rangetable; /* range table for qual, filled in by * transformStmt() */ diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index 4b47a84db5..43af861df0 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: relation.h,v 1.57 2001/06/05 05:26:05 tgl Exp $ + * $Id: relation.h,v 1.58 2001/08/21 16:36:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -183,7 +183,7 @@ typedef struct RelOptInfo * tuples - number of index tuples in index * ncolumns - number of columns in index * nkeys - number of keys used by index (input columns) - * classlist - List of PG_AMOPCLASS OIDs for the index + * classlist - List of PG_OPCLASS OIDs for the index * indexkeys - List of base-relation attribute numbers that are index keys * ordering - List of PG_OPERATOR OIDs which order the indexscan result * relam - the OID of the pg_am of the index @@ -191,7 +191,6 @@ typedef struct RelOptInfo * indproc - OID of the function if a functional index, else 0 * indpred - index predicate if a partial index, else NULL * unique - true if index is unique - * lossy - true if index is lossy (may return non-matching tuples) * * ncolumns and nkeys are the same except for a functional index, * wherein ncolumns is 1 (the single function output) while nkeys @@ -227,7 +226,6 @@ typedef struct IndexOptInfo Oid indproc; /* if a functional index */ List *indpred; /* if a partial index */ bool unique; /* if a unique index */ - bool lossy; /* if a lossy index */ } IndexOptInfo; /* diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h index f676e61d1f..08fe2ccd77 100644 --- a/src/include/optimizer/paths.h +++ b/src/include/optimizer/paths.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: paths.h,v 1.54 2001/06/05 17:13:51 tgl Exp $ + * $Id: paths.h,v 1.55 2001/08/21 16:36:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -36,8 +36,8 @@ extern RelOptInfo *make_fromexpr_rel(Query *root, FromExpr *from); * routines to generate index paths */ extern void create_index_paths(Query *root, RelOptInfo *rel); -extern Oid indexable_operator(Expr *clause, Oid opclass, Oid relam, - bool indexkey_on_left); +extern Oid indexable_operator(Expr *clause, Oid opclass, + bool indexkey_on_left); extern List *extract_or_indexqual_conditions(RelOptInfo *rel, IndexOptInfo *index, Expr *orsubclause); diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h index d418e8a10d..ac7d9ba100 100644 --- a/src/include/utils/lsyscache.h +++ b/src/include/utils/lsyscache.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: lsyscache.h,v 1.34 2001/06/14 01:09:22 tgl Exp $ + * $Id: lsyscache.h,v 1.35 2001/08/21 16:36:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -15,7 +15,8 @@ #include "access/htup.h" -extern bool op_class(Oid opno, Oid opclass, Oid amopid); +extern bool op_in_opclass(Oid opno, Oid opclass); +extern bool op_requires_recheck(Oid opno, Oid opclass); extern char *get_attname(Oid relid, AttrNumber attnum); extern AttrNumber get_attnum(Oid relid, char *attname); extern Oid get_atttype(Oid relid, AttrNumber attnum); @@ -23,6 +24,7 @@ extern bool get_attisset(Oid relid, char *attname); extern int32 get_atttypmod(Oid relid, AttrNumber attnum); extern void get_atttypetypmod(Oid relid, AttrNumber attnum, Oid *typid, int32 *typmod); +extern bool opclass_is_btree(Oid opclass); extern RegProcedure get_opcode(Oid opno); extern char *get_opname(Oid opno); extern bool op_mergejoinable(Oid opno, Oid ltype, Oid rtype, 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); |