mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Add operator strategy and comparison-value datatype fields to ScanKey.
Remove the 'strategy map' code, which was a large amount of mechanism that no longer had any use except reverse-mapping from procedure OID to strategy number. Passing the strategy number to the index AM in the first place is simpler and faster. This is a preliminary step in planned support for cross-datatype index operations. I'm committing it now since the ScanKeyEntryInitialize() API change touches quite a lot of files, and I want to commit those changes before the tree drifts under me.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: nbtree.h,v 1.71 2003/09/29 23:40:26 tgl Exp $
|
||||
* $Id: nbtree.h,v 1.72 2003/11/09 21:30:37 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -340,16 +340,10 @@ typedef struct xl_btree_newpage
|
||||
|
||||
|
||||
/*
|
||||
* Operator strategy numbers -- ordering of these is <, <=, =, >=, >
|
||||
* Operator strategy numbers for B-tree have been moved to access/skey.h,
|
||||
* because many places need to use them in ScanKeyEntryInitialize() calls.
|
||||
*/
|
||||
|
||||
#define BTLessStrategyNumber 1
|
||||
#define BTLessEqualStrategyNumber 2
|
||||
#define BTEqualStrategyNumber 3
|
||||
#define BTGreaterEqualStrategyNumber 4
|
||||
#define BTGreaterStrategyNumber 5
|
||||
#define BTMaxStrategyNumber 5
|
||||
|
||||
/*
|
||||
* When a new operator class is declared, we require that the user
|
||||
* supply us with an amproc procedure for determining whether, for
|
||||
@ -479,12 +473,6 @@ extern bool _bt_first(IndexScanDesc scan, ScanDirection dir);
|
||||
extern bool _bt_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir);
|
||||
extern Buffer _bt_get_endpoint(Relation rel, uint32 level, bool rightmost);
|
||||
|
||||
/*
|
||||
* prototypes for functions in nbtstrat.c
|
||||
*/
|
||||
extern StrategyNumber _bt_getstrat(Relation rel, AttrNumber attno,
|
||||
RegProcedure proc);
|
||||
|
||||
/*
|
||||
* prototypes for functions in nbtutils.c
|
||||
*/
|
||||
|
Reference in New Issue
Block a user