mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-12 17:37:07 +08:00
Partial indexes work again, courtesy of Martijn van Oosterhout.
Note: I didn't force an initdb, figuring that one today was enough. However, there is a new function in pg_proc.h, and pg_dump won't be able to dump partial indexes until you add that function.
This commit is contained in:
@ -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.36 2001/07/15 22:48:18 tgl Exp $
|
||||
* $Id: index.h,v 1.37 2001/07/16 05:06:59 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -30,8 +30,6 @@ typedef void (*IndexBuildCallback) (Relation index,
|
||||
extern Form_pg_am AccessMethodObjectIdGetForm(Oid accessMethodObjectId,
|
||||
MemoryContext resultCxt);
|
||||
|
||||
extern void UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate);
|
||||
|
||||
extern void InitIndexStrategy(int numatts,
|
||||
Relation indexRelation,
|
||||
Oid accessMethodObjectId);
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: pg_proc.h,v 1.197 2001/07/15 22:48:18 tgl Exp $
|
||||
* $Id: pg_proc.h,v 1.198 2001/07/16 05:06:59 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
* The script catalog/genbki.sh reads this file and generates .bki
|
||||
@ -2146,6 +2146,9 @@ DATA(insert OID = 1642 ( pg_get_userbyid PGUID 12 f t f t 1 f 19 "23" 100 0
|
||||
DESCR("user name by UID (with fallback)");
|
||||
DATA(insert OID = 1643 ( pg_get_indexdef PGUID 12 f t f t 1 f 25 "26" 100 0 0 100 pg_get_indexdef - ));
|
||||
DESCR("index description");
|
||||
DATA(insert OID = 1716 ( pg_get_expr PGUID 12 f t f t 2 f 25 "25 26" 100 0 0 100 pg_get_expr - ));
|
||||
DESCR("deparse an encoded expression");
|
||||
|
||||
|
||||
/* Generic referential integrity constraint triggers */
|
||||
DATA(insert OID = 1644 ( RI_FKey_check_ins PGUID 12 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_check_ins - ));
|
||||
|
||||
@ -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.22 2001/01/24 19:43:23 momjian Exp $
|
||||
* $Id: defrem.h,v 1.23 2001/07/16 05:07:00 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -18,7 +18,7 @@
|
||||
#include "tcop/dest.h"
|
||||
|
||||
/*
|
||||
* prototypes in defind.c
|
||||
* prototypes in indexcmds.c
|
||||
*/
|
||||
extern void DefineIndex(char *heapRelationName,
|
||||
char *indexRelationName,
|
||||
@ -29,9 +29,6 @@ extern void DefineIndex(char *heapRelationName,
|
||||
bool primary,
|
||||
Expr *predicate,
|
||||
List *rangetable);
|
||||
extern void ExtendIndex(char *indexRelationName,
|
||||
Expr *predicate,
|
||||
List *rangetable);
|
||||
extern void RemoveIndex(char *name);
|
||||
extern void ReindexIndex(const char *indexRelationName, bool force);
|
||||
extern void ReindexTable(const char *relationName, bool force);
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
* or in config.h afterwards. Of course, if you edit config.h, then your
|
||||
* changes will be overwritten the next time you run configure.
|
||||
*
|
||||
* $Id: config.h.in,v 1.167 2001/07/11 19:03:07 tgl Exp $
|
||||
* $Id: config.h.in,v 1.168 2001/07/16 05:07:00 tgl Exp $
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
@ -310,7 +310,6 @@
|
||||
/* #define ACLDEBUG */
|
||||
/* #define RTDEBUG */
|
||||
/* #define GISTDEBUG */
|
||||
/* #define OMIT_PARTIAL_INDEX */
|
||||
|
||||
/*
|
||||
* defining unsafe floats will make float4 and float8 ops faster
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: execnodes.h,v 1.61 2001/06/01 02:41:36 tgl Exp $
|
||||
* $Id: execnodes.h,v 1.62 2001/07/16 05:07:00 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -34,7 +34,7 @@
|
||||
* NumKeyAttrs number of key attributes for this index
|
||||
* (ie, number of attrs from underlying relation)
|
||||
* KeyAttrNumbers underlying-rel attribute numbers used as keys
|
||||
* Predicate partial-index predicate, or NULL if none
|
||||
* Predicate partial-index predicate, or NIL if none
|
||||
* FuncOid OID of function, or InvalidOid if not f. index
|
||||
* FuncInfo fmgr lookup data for function, if FuncOid valid
|
||||
* Unique is it a unique index?
|
||||
@ -46,7 +46,7 @@ typedef struct IndexInfo
|
||||
int ii_NumIndexAttrs;
|
||||
int ii_NumKeyAttrs;
|
||||
AttrNumber ii_KeyAttrNumbers[INDEX_MAX_KEYS];
|
||||
Node *ii_Predicate;
|
||||
List *ii_Predicate;
|
||||
Oid ii_FuncOid;
|
||||
FmgrInfo ii_FuncInfo;
|
||||
bool ii_Unique;
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: builtins.h,v 1.157 2001/07/11 22:14:03 momjian Exp $
|
||||
* $Id: builtins.h,v 1.158 2001/07/16 05:07:00 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -337,6 +337,7 @@ extern Datum pg_get_ruledef(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_get_viewdef(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_get_indexdef(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_get_userbyid(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_get_expr(PG_FUNCTION_ARGS);
|
||||
extern char *deparse_expression(Node *expr, List *dpcontext,
|
||||
bool forceprefix);
|
||||
extern List *deparse_context_for(char *relname, Oid relid);
|
||||
|
||||
Reference in New Issue
Block a user