PostgreSQL Source Code: src/include/access/gist.h File Reference (original) (raw)

Go to the source code of this file.

Data Structures
struct GISTPageOpaqueData
struct GIST_SPLITVEC
struct GISTENTRY
struct GISTDeletedPageContents
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 GIST_OPTIONS_PROC 10
#define GIST_SORTSUPPORT_PROC 11
#define GIST_STRATNUM_PROC 12
#define GISTNProcs 12
#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 GistBuildLSN ((XLogRecPtr) 1)
#define GISTMaxIndexTupleSize
#define GISTMaxIndexKeySize (GISTMaxIndexTupleSize - MAXALIGN(sizeof(IndexTupleData)))
#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 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 GISTPageOpaqueData * GISTPageOpaque
typedef struct GIST_SPLITVEC GIST_SPLITVEC
typedef struct GISTENTRY GISTENTRY
typedef struct GISTDeletedPageContents GISTDeletedPageContents
Functions
static void GistPageSetDeleted (Page page, FullTransactionId deletexid)
static FullTransactionId GistPageGetDeleteXid (Page page)
StrategyNumber gisttranslatecmptype (CompareType cmptype, Oid opfamily)

F_DELETED

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

Definition at line 50 of file gist.h.

F_FOLLOW_RIGHT

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

Definition at line 52 of file gist.h.

F_HAS_GARBAGE

Value:

Definition at line 53 of file gist.h.

F_LEAF

#define F_LEAF (1 << 0) /* leaf page */

Definition at line 49 of file gist.h.

F_TUPLES_DELETED

Value:

Definition at line 51 of file gist.h.

GEVHDRSZ

GIST_COMPRESS_PROC

#define GIST_COMPRESS_PROC 3

Definition at line 34 of file gist.h.

GIST_CONSISTENT_PROC

#define GIST_CONSISTENT_PROC 1

Definition at line 32 of file gist.h.

GIST_DECOMPRESS_PROC

#define GIST_DECOMPRESS_PROC 4

Definition at line 35 of file gist.h.

GIST_DISTANCE_PROC

#define GIST_DISTANCE_PROC 8

Definition at line 39 of file gist.h.

GIST_EQUAL_PROC

#define GIST_EQUAL_PROC 7

Definition at line 38 of file gist.h.

GIST_FETCH_PROC

#define GIST_FETCH_PROC 9

Definition at line 40 of file gist.h.

GIST_LEAF

GIST_OPTIONS_PROC

#define GIST_OPTIONS_PROC 10

Definition at line 41 of file gist.h.

GIST_PAGE_ID

#define GIST_PAGE_ID 0xFF81

Definition at line 112 of file gist.h.

GIST_PENALTY_PROC

#define GIST_PENALTY_PROC 5

Definition at line 36 of file gist.h.

GIST_PICKSPLIT_PROC

#define GIST_PICKSPLIT_PROC 6

Definition at line 37 of file gist.h.

GIST_SORTSUPPORT_PROC

#define GIST_SORTSUPPORT_PROC 11

Definition at line 42 of file gist.h.

GIST_STRATNUM_PROC

#define GIST_STRATNUM_PROC 12

Definition at line 43 of file gist.h.

GIST_UNION_PROC

#define GIST_UNION_PROC 2

Definition at line 33 of file gist.h.

GistBuildLSN

GistClearFollowRight

GistClearPageHasGarbage

GistClearTuplesDeleted

gistentryinit

| #define gistentryinit | ( | | e, | | --------------------- | - | | -------------------------------------------------------------- | | | k, | | | | | | r, | | | | | | pg, | | | | | | o, | | | | | | l | | | | | ) | | | |

Value:

do { (e).key = (k); (e).rel = (r); (e).page = (pg); \

(e).offset = (o); (e).leafkey = (l); } while (0)

Definition at line 245 of file gist.h.

GistFollowRight

GistMarkFollowRight

GistMarkPageHasGarbage

GistMarkTuplesDeleted

GISTMaxIndexKeySize

GISTMaxIndexTupleSize

#define GISTMaxIndexTupleSize

Value:

#define SizeOfPageHeaderData

#define MAXALIGN_DOWN(LEN)

Definition at line 99 of file gist.h.

GISTNProcs

GistPageGetNSN

GistPageGetOpaque

GistPageHasGarbage

GistPageIsDeleted

GistPageIsLeaf

GistPageSetNSN

GistTuplesDeleted

GIST_SPLITVEC

GISTDeletedPageContents

GISTENTRY

GistNSN

GISTPageOpaque

GISTPageOpaqueData

PageGistNSN

GistPageGetDeleteXid()

GistPageSetDeleted()

gisttranslatecmptype()

Definition at line 1098 of file gistutil.c.

1099{

1100 Oid funcid;

1102

1103

1107

1108

1111}

#define OidIsValid(objectId)

Datum OidFunctionCall1Coll(Oid functionId, Oid collation, Datum arg1)

#define GIST_STRATNUM_PROC

Oid get_opfamily_proc(Oid opfamily, Oid lefttype, Oid righttype, int16 procnum)

static uint16 DatumGetUInt16(Datum X)

static Datum Int32GetDatum(int32 X)

References DatumGetUInt16(), get_opfamily_proc(), GIST_STRATNUM_PROC, Int32GetDatum(), InvalidOid, InvalidStrategy, OidFunctionCall1Coll(), and OidIsValid.

Referenced by gisthandler().