Header And Logo

PostgreSQL
| The world's most advanced open source database.

Data Structures | Defines | Typedefs

gist.h File Reference

#include "access/xlog.h"
#include "access/xlogdefs.h"
#include "storage/block.h"
#include "storage/bufpage.h"
#include "utils/relcache.h"
Include dependency graph for gist.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GISTPageOpaqueData
struct  GIST_SPLITVEC
struct  GISTENTRY
struct  GistEntryVector

Defines

#define GIST_CONSISTENT_PROC   1
#define GIST_UNION_PROC   2
#define GIST_COMPRESS_PROC   3
#define GIST_DECOMPRESS_PROC   4
#define GIST_PENALTY_PROC   5
#define GIST_PICKSPLIT_PROC   6
#define GIST_EQUAL_PROC   7
#define GIST_DISTANCE_PROC   8
#define GISTNProcs   8
#define RTLeftStrategyNumber   1
#define RTOverLeftStrategyNumber   2
#define RTOverlapStrategyNumber   3
#define RTOverRightStrategyNumber   4
#define RTRightStrategyNumber   5
#define RTSameStrategyNumber   6
#define RTContainsStrategyNumber   7
#define RTContainedByStrategyNumber   8
#define RTOverBelowStrategyNumber   9
#define RTBelowStrategyNumber   10
#define RTAboveStrategyNumber   11
#define RTOverAboveStrategyNumber   12
#define RTOldContainsStrategyNumber   13
#define RTOldContainedByStrategyNumber   14
#define RTKNNSearchStrategyNumber   15
#define F_LEAF   (1 << 0)
#define F_DELETED   (1 << 1)
#define F_TUPLES_DELETED   (1 << 2)
#define F_FOLLOW_RIGHT   (1 << 3)
#define GIST_PAGE_ID   0xFF81
#define GistPageGetOpaque(page)   ( (GISTPageOpaque) PageGetSpecialPointer(page) )
#define GistPageIsLeaf(page)   ( GistPageGetOpaque(page)->flags & F_LEAF)
#define GIST_LEAF(entry)   (GistPageIsLeaf((entry)->page))
#define GistPageSetLeaf(page)   ( GistPageGetOpaque(page)->flags |= F_LEAF)
#define GistPageSetNonLeaf(page)   ( GistPageGetOpaque(page)->flags &= ~F_LEAF)
#define GistPageIsDeleted(page)   ( GistPageGetOpaque(page)->flags & F_DELETED)
#define GistPageSetDeleted(page)   ( GistPageGetOpaque(page)->flags |= F_DELETED)
#define GistPageSetNonDeleted(page)   ( GistPageGetOpaque(page)->flags &= ~F_DELETED)
#define GistTuplesDeleted(page)   ( GistPageGetOpaque(page)->flags & F_TUPLES_DELETED)
#define GistMarkTuplesDeleted(page)   ( GistPageGetOpaque(page)->flags |= F_TUPLES_DELETED)
#define GistClearTuplesDeleted(page)   ( GistPageGetOpaque(page)->flags &= ~F_TUPLES_DELETED)
#define GistFollowRight(page)   ( GistPageGetOpaque(page)->flags & F_FOLLOW_RIGHT)
#define GistMarkFollowRight(page)   ( GistPageGetOpaque(page)->flags |= F_FOLLOW_RIGHT)
#define GistClearFollowRight(page)   ( GistPageGetOpaque(page)->flags &= ~F_FOLLOW_RIGHT)
#define GistPageGetNSN(page)   ( PageXLogRecPtrGet(GistPageGetOpaque(page)->nsn))
#define GistPageSetNSN(page, val)   ( PageXLogRecPtrSet(GistPageGetOpaque(page)->nsn, val))
#define GEVHDRSZ   (offsetof(GistEntryVector, vector))
#define gistentryinit(e, k, r, pg, o, l)

Typedefs

typedef XLogRecPtr GistNSN
typedef PageXLogRecPtr PageGistNSN
typedef struct GISTPageOpaqueData GISTPageOpaqueData
typedef GISTPageOpaqueDataGISTPageOpaque
typedef struct GIST_SPLITVEC GIST_SPLITVEC
typedef struct GISTENTRY GISTENTRY

Define Documentation

#define F_DELETED   (1 << 1)

Definition at line 62 of file gist.h.

#define F_FOLLOW_RIGHT   (1 << 3)

Definition at line 64 of file gist.h.

#define F_LEAF   (1 << 0)

Definition at line 61 of file gist.h.

Referenced by gistbuild(), gistbuildempty(), gistplacetopage(), and gistRedoCreateIndex().

#define F_TUPLES_DELETED   (1 << 2)

Definition at line 63 of file gist.h.

#define GEVHDRSZ   (offsetof(GistEntryVector, vector))

Definition at line 177 of file gist.h.

Referenced by genericPickSplit(), gistMakeUnionItVec(), gistMakeUnionKey(), and gistSplitByKey().

#define GIST_COMPRESS_PROC   3

Definition at line 30 of file gist.h.

Referenced by initGISTstate().

#define GIST_CONSISTENT_PROC   1

Definition at line 28 of file gist.h.

Referenced by initGISTstate().

#define GIST_DECOMPRESS_PROC   4

Definition at line 31 of file gist.h.

Referenced by initGISTstate().

#define GIST_DISTANCE_PROC   8

Definition at line 35 of file gist.h.

Referenced by gistrescan(), and initGISTstate().

#define GIST_EQUAL_PROC   7

Definition at line 34 of file gist.h.

Referenced by initGISTstate().

#define GIST_LEAF (   entry  )     (GistPageIsLeaf((entry)->page))
#define GIST_PAGE_ID   0xFF81

Definition at line 89 of file gist.h.

#define GIST_PENALTY_PROC   5

Definition at line 32 of file gist.h.

Referenced by initGISTstate().

#define GIST_PICKSPLIT_PROC   6

Definition at line 33 of file gist.h.

Referenced by initGISTstate().

#define GIST_UNION_PROC   2

Definition at line 29 of file gist.h.

Referenced by initGISTstate().

#define GistClearFollowRight (   page  )     ( GistPageGetOpaque(page)->flags &= ~F_FOLLOW_RIGHT)

Definition at line 162 of file gist.h.

Referenced by gistplacetopage(), gistRedoClearFollowRight(), and gistRedoPageSplitRecord().

#define GistClearTuplesDeleted (   page  )     ( GistPageGetOpaque(page)->flags &= ~F_TUPLES_DELETED)

Definition at line 158 of file gist.h.

Referenced by gistRedoPageUpdateRecord().

#define gistentryinit (   e,
  k,
  r,
  pg,
  o,
  l 
)
#define GistFollowRight (   page  )     ( GistPageGetOpaque(page)->flags & F_FOLLOW_RIGHT)
#define GistMarkFollowRight (   page  )     ( GistPageGetOpaque(page)->flags |= F_FOLLOW_RIGHT)

Definition at line 161 of file gist.h.

Referenced by gistplacetopage(), and gistRedoPageSplitRecord().

#define GistMarkTuplesDeleted (   page  )     ( GistPageGetOpaque(page)->flags |= F_TUPLES_DELETED)

Definition at line 157 of file gist.h.

Referenced by gistbulkdelete(), and gistRedoPageUpdateRecord().

#define GISTNProcs   8

Definition at line 36 of file gist.h.

#define GistPageGetNSN (   page  )     ( PageXLogRecPtrGet(GistPageGetOpaque(page)->nsn))

Definition at line 164 of file gist.h.

Referenced by gistdoinsert(), gistFindPath(), gistplacetopage(), gistScanPage(), and pushStackIfSplited().

#define GistPageGetOpaque (   page  )     ( (GISTPageOpaque) PageGetSpecialPointer(page) )
#define GistPageIsDeleted (   page  )     ( GistPageGetOpaque(page)->flags & F_DELETED)

Definition at line 152 of file gist.h.

Referenced by gistNewBuffer(), and gistvacuumcleanup().

#define GistPageIsLeaf (   page  )     ( GistPageGetOpaque(page)->flags & F_LEAF)
#define GistPageSetDeleted (   page  )     ( GistPageGetOpaque(page)->flags |= F_DELETED)

Definition at line 153 of file gist.h.

#define GistPageSetLeaf (   page  )     ( GistPageGetOpaque(page)->flags |= F_LEAF)

Definition at line 149 of file gist.h.

Referenced by gistRedoPageUpdateRecord().

#define GistPageSetNonDeleted (   page  )     ( GistPageGetOpaque(page)->flags &= ~F_DELETED)

Definition at line 154 of file gist.h.

#define GistPageSetNonLeaf (   page  )     ( GistPageGetOpaque(page)->flags &= ~F_LEAF)

Definition at line 150 of file gist.h.

#define GistPageSetNSN (   page,
  val 
)    ( PageXLogRecPtrSet(GistPageGetOpaque(page)->nsn, val))

Definition at line 165 of file gist.h.

Referenced by gistplacetopage(), gistRedoClearFollowRight(), and gistRedoPageSplitRecord().

#define GistTuplesDeleted (   page  )     ( GistPageGetOpaque(page)->flags & F_TUPLES_DELETED)

Definition at line 156 of file gist.h.

#define RTAboveStrategyNumber   11
#define RTBelowStrategyNumber   10
#define RTContainedByStrategyNumber   8
#define RTContainsStrategyNumber   7
#define RTKNNSearchStrategyNumber   15

Definition at line 56 of file gist.h.

#define RTLeftStrategyNumber   1
#define RTOldContainedByStrategyNumber   14
#define RTOldContainsStrategyNumber   13
#define RTOverAboveStrategyNumber   12

Definition at line 53 of file gist.h.

Referenced by gist_box_leaf_consistent(), and rtree_internal_consistent().

#define RTOverBelowStrategyNumber   9

Definition at line 50 of file gist.h.

Referenced by gist_box_leaf_consistent(), and rtree_internal_consistent().

#define RTOverlapStrategyNumber   3
#define RTOverLeftStrategyNumber   2
#define RTOverRightStrategyNumber   4
#define RTRightStrategyNumber   5
#define RTSameStrategyNumber   6

Typedef Documentation

typedef struct GIST_SPLITVEC GIST_SPLITVEC
typedef struct GISTENTRY GISTENTRY

Definition at line 66 of file gist.h.

Definition at line 81 of file gist.h.

Definition at line 71 of file gist.h.