PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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
 

Macros

#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 GIST_FETCH_PROC   9
 
#define GISTNProcs   9
 
#define F_LEAF   (1 << 0) /* leaf page */
 
#define F_DELETED   (1 << 1) /* the page has been deleted */
 
#define F_TUPLES_DELETED
 
#define F_FOLLOW_RIGHT   (1 << 3) /* page to the right has no downlink */
 
#define F_HAS_GARBAGE
 
#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 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 GistPageHasGarbage(page)   ( GistPageGetOpaque(page)->flags & F_HAS_GARBAGE)
 
#define GistMarkPageHasGarbage(page)   ( GistPageGetOpaque(page)->flags |= F_HAS_GARBAGE)
 
#define GistClearPageHasGarbage(page)   ( GistPageGetOpaque(page)->flags &= ~F_HAS_GARBAGE)
 
#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
 

Macro Definition Documentation

#define F_DELETED   (1 << 1) /* the page has been deleted */

Definition at line 43 of file gist.h.

#define F_FOLLOW_RIGHT   (1 << 3) /* page to the right has no downlink */

Definition at line 46 of file gist.h.

#define F_HAS_GARBAGE
Value:
(1 << 4) /* some tuples on the page are dead,
* but not deleted yet */

Definition at line 47 of file gist.h.

#define F_LEAF   (1 << 0) /* leaf page */
#define F_TUPLES_DELETED
Value:
(1 << 2) /* some tuples on the page were
* deleted */

Definition at line 44 of file gist.h.

#define GEVHDRSZ   (offsetof(GistEntryVector, vector))

Definition at line 164 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 gistcanreturn(), gistproperty(), gistvalidate(), and initGISTstate().

#define GIST_CONSISTENT_PROC   1

Definition at line 28 of file gist.h.

Referenced by gistvalidate(), and initGISTstate().

#define GIST_DECOMPRESS_PROC   4

Definition at line 31 of file gist.h.

Referenced by gistvalidate(), and initGISTstate().

#define GIST_DISTANCE_PROC   8

Definition at line 35 of file gist.h.

Referenced by gistproperty(), gistrescan(), gistvalidate(), and initGISTstate().

#define GIST_EQUAL_PROC   7

Definition at line 34 of file gist.h.

Referenced by gistvalidate(), and initGISTstate().

#define GIST_FETCH_PROC   9

Definition at line 36 of file gist.h.

Referenced by gistcanreturn(), gistproperty(), gistvalidate(), and initGISTstate().

#define GIST_PAGE_ID   0xFF81

Definition at line 74 of file gist.h.

Referenced by GISTInitBuffer().

#define GIST_PENALTY_PROC   5

Definition at line 32 of file gist.h.

Referenced by gistvalidate(), and initGISTstate().

#define GIST_PICKSPLIT_PROC   6

Definition at line 33 of file gist.h.

Referenced by gistvalidate(), and initGISTstate().

#define GIST_UNION_PROC   2

Definition at line 29 of file gist.h.

Referenced by gistvalidate(), and initGISTstate().

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

Definition at line 149 of file gist.h.

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

#define GistClearPageHasGarbage (   page)    ( GistPageGetOpaque(page)->flags &= ~F_HAS_GARBAGE)

Definition at line 145 of file gist.h.

Referenced by gist_mask(), and gistvacuumpage().

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

Definition at line 141 of file gist.h.

#define GistFollowRight (   page)    ( GistPageGetOpaque(page)->flags & F_FOLLOW_RIGHT)
#define GistMarkFollowRight (   page)    ( GistPageGetOpaque(page)->flags |= F_FOLLOW_RIGHT)

Definition at line 148 of file gist.h.

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

#define GistMarkPageHasGarbage (   page)    ( GistPageGetOpaque(page)->flags |= F_HAS_GARBAGE)

Definition at line 144 of file gist.h.

Referenced by gistkillitems().

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

Definition at line 140 of file gist.h.

Referenced by gistbulkdelete(), and gistRedoPageUpdateRecord().

#define GISTNProcs   9

Definition at line 37 of file gist.h.

Referenced by gisthandler(), and gistvalidate().

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

Definition at line 151 of file gist.h.

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

#define GistPageHasGarbage (   page)    ( GistPageGetOpaque(page)->flags & F_HAS_GARBAGE)

Definition at line 143 of file gist.h.

Referenced by gistplacetopage().

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

Definition at line 135 of file gist.h.

Referenced by gistNewBuffer(), and gistvacuumcleanup().

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

Definition at line 136 of file gist.h.

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

Definition at line 137 of file gist.h.

#define GistPageSetNSN (   page,
  val 
)    ( PageXLogRecPtrSet(GistPageGetOpaque(page)->nsn, val))
#define GistTuplesDeleted (   page)    ( GistPageGetOpaque(page)->flags & F_TUPLES_DELETED)

Definition at line 139 of file gist.h.

Typedef Documentation

Definition at line 50 of file gist.h.

Definition at line 66 of file gist.h.

Definition at line 56 of file gist.h.