PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | spgConfigIn |
struct | spgConfigOut |
struct | spgChooseIn |
struct | spgChooseOut |
struct | spgPickSplitIn |
struct | spgPickSplitOut |
struct | spgInnerConsistentIn |
struct | spgInnerConsistentOut |
struct | spgLeafConsistentIn |
struct | spgLeafConsistentOut |
Macros | |
#define | SPGIST_CONFIG_PROC 1 |
#define | SPGIST_CHOOSE_PROC 2 |
#define | SPGIST_PICKSPLIT_PROC 3 |
#define | SPGIST_INNER_CONSISTENT_PROC 4 |
#define | SPGIST_LEAF_CONSISTENT_PROC 5 |
#define | SPGIST_COMPRESS_PROC 6 |
#define | SPGIST_OPTIONS_PROC 7 |
#define | SPGISTNRequiredProc 5 |
#define | SPGISTNProc 7 |
Typedefs | |
typedef struct spgConfigIn | spgConfigIn |
typedef struct spgConfigOut | spgConfigOut |
typedef struct spgChooseIn | spgChooseIn |
typedef enum spgChooseResultType | spgChooseResultType |
typedef struct spgChooseOut | spgChooseOut |
typedef struct spgPickSplitIn | spgPickSplitIn |
typedef struct spgPickSplitOut | spgPickSplitOut |
typedef struct spgInnerConsistentIn | spgInnerConsistentIn |
typedef struct spgInnerConsistentOut | spgInnerConsistentOut |
typedef struct spgLeafConsistentIn | spgLeafConsistentIn |
typedef struct spgLeafConsistentOut | spgLeafConsistentOut |
Enumerations | |
enum | spgChooseResultType { spgMatchNode = 1 , spgAddNode , spgSplitTuple } |
typedef struct spgChooseIn spgChooseIn |
typedef struct spgChooseOut spgChooseOut |
typedef enum spgChooseResultType spgChooseResultType |
typedef struct spgConfigIn spgConfigIn |
typedef struct spgConfigOut spgConfigOut |
typedef struct spgInnerConsistentIn spgInnerConsistentIn |
typedef struct spgInnerConsistentOut spgInnerConsistentOut |
typedef struct spgLeafConsistentIn spgLeafConsistentIn |
typedef struct spgLeafConsistentOut spgLeafConsistentOut |
typedef struct spgPickSplitIn spgPickSplitIn |
typedef struct spgPickSplitOut spgPickSplitOut |
enum spgChooseResultType |
Definition at line 332 of file spgvalidate.c.
References ereport, errcode(), errmsg(), ERROR, functions, lfirst, OpFamilyMember::number, OpFamilyMember::ref_is_family, OpFamilyMember::ref_is_hard, OpFamilyMember::refobjid, SPGIST_CHOOSE_PROC, SPGIST_COMPRESS_PROC, SPGIST_CONFIG_PROC, SPGIST_INNER_CONSISTENT_PROC, SPGIST_LEAF_CONSISTENT_PROC, SPGIST_OPTIONS_PROC, and SPGIST_PICKSPLIT_PROC.
Referenced by spghandler().
IndexScanDesc spgbeginscan | ( | Relation | rel, |
int | keysz, | ||
int | orderbysz | ||
) |
Definition at line 304 of file spgscan.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, SpGistState::attType, CurrentMemoryContext, fmgr_info_copy(), get_float8_infinity(), getSpGistTupleDesc(), i, index_getprocinfo(), SpGistScanOpaqueData::indexCollation, IndexScanDescData::indexRelation, SpGistScanOpaqueData::infDistances, initSpGistState(), SpGistScanOpaqueData::innerConsistentFn, SpGistScanOpaqueData::keyData, SpGistScanOpaqueData::leafConsistentFn, SpGistScanOpaqueData::nonNullOrderByOffsets, IndexScanDescData::numberOfOrderBys, IndexScanDescData::opaque, SpGistScanOpaqueData::orderByTypes, palloc(), palloc0(), RelationData::rd_indcollation, SpGistScanOpaqueData::reconTupDesc, RelationGetIndexScan(), SPGIST_INNER_CONSISTENT_PROC, SPGIST_LEAF_CONSISTENT_PROC, SpGistScanOpaqueData::state, SpGistScanOpaqueData::tempCxt, SpGistScanOpaqueData::traversalCxt, IndexScanDescData::xs_hitupdesc, IndexScanDescData::xs_orderbynulls, IndexScanDescData::xs_orderbyvals, and SpGistScanOpaqueData::zeroDistances.
Referenced by spghandler().
IndexBuildResult* spgbuild | ( | Relation | heap, |
Relation | index, | ||
struct IndexInfo * | indexInfo | ||
) |
Definition at line 73 of file spginsert.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, BufferGetBlockNumber(), BufferGetPage(), CurrentMemoryContext, elog, END_CRIT_SECTION, ERROR, IndexBuildResult::heap_tuples, IndexBuildResult::index_tuples, SpGistBuildState::indtuples, initSpGistState(), SpGistState::isBuild, log_newpage_range(), MAIN_FORKNUM, MarkBufferDirty(), MemoryContextDelete(), palloc0(), RelationGetNumberOfBlocks, RelationGetRelationName, RelationNeedsWAL, SPGIST_LEAF, SPGIST_METAPAGE_BLKNO, SPGIST_NULL_BLKNO, SPGIST_NULLS, SPGIST_ROOT_BLKNO, spgistBuildCallback(), SpGistInitBuffer(), SpGistInitMetapage(), SpGistNewBuffer(), SpGistUpdateMetaPage(), SpGistBuildState::spgstate, START_CRIT_SECTION, table_index_build_scan(), SpGistBuildState::tmpCtx, and UnlockReleaseBuffer().
Referenced by spghandler().
void spgbuildempty | ( | Relation | index | ) |
Definition at line 154 of file spginsert.c.
References buf, INIT_FORKNUM, smgr_bulk_finish(), smgr_bulk_get_buf(), smgr_bulk_start_rel(), smgr_bulk_write(), SPGIST_LEAF, SPGIST_METAPAGE_BLKNO, SPGIST_NULL_BLKNO, SPGIST_NULLS, SPGIST_ROOT_BLKNO, SpGistInitMetapage(), and SpGistInitPage().
Referenced by spghandler().
IndexBulkDeleteResult* spgbulkdelete | ( | IndexVacuumInfo * | info, |
IndexBulkDeleteResult * | stats, | ||
IndexBulkDeleteCallback | callback, | ||
void * | callback_state | ||
) |
Definition at line 916 of file spgvacuum.c.
References spgBulkDeleteState::callback, callback(), spgBulkDeleteState::callback_state, spgBulkDeleteState::info, palloc0(), spgvacuumscan(), and spgBulkDeleteState::stats.
Referenced by spghandler().
Definition at line 1081 of file spgscan.c.
References spgConfigOut::canReturnData, SpGistCache::config, and spgGetCache().
Referenced by spghandler().
void spgendscan | ( | IndexScanDesc | scan | ) |
Definition at line 427 of file spgscan.c.
References SpGistState::deadTupleStorage, FreeTupleDesc(), SpGistState::index, SpGistScanOpaqueData::infDistances, SpGistScanOpaqueData::keyData, SpGistState::leafTupDesc, MemoryContextDelete(), SpGistScanOpaqueData::nonNullOrderByOffsets, IndexScanDescData::numberOfOrderBys, IndexScanDescData::opaque, SpGistScanOpaqueData::orderByTypes, pfree(), RelationGetDescr, SpGistScanOpaqueData::state, SpGistScanOpaqueData::tempCxt, SpGistScanOpaqueData::traversalCxt, IndexScanDescData::xs_orderbynulls, IndexScanDescData::xs_orderbyvals, and SpGistScanOpaqueData::zeroDistances.
Referenced by spghandler().
int64 spggetbitmap | ( | IndexScanDesc | scan, |
TIDBitmap * | tbm | ||
) |
Definition at line 940 of file spgscan.c.
References IndexScanDescData::indexRelation, SpGistScanOpaqueData::ntids, IndexScanDescData::opaque, spgWalk(), storeBitmap(), SpGistScanOpaqueData::tbm, and SpGistScanOpaqueData::want_itup.
Referenced by spghandler().
bool spggettuple | ( | IndexScanDesc | scan, |
ScanDirection | dir | ||
) |
Definition at line 1024 of file spgscan.c.
References SpGistScanOpaqueData::distances, elog, ERROR, ForwardScanDirection, SpGistScanOpaqueData::heapPtrs, i, if(), index_store_float8_orderby_distances(), IndexScanDescData::indexRelation, SpGistScanOpaqueData::iPtr, SpGistScanOpaqueData::nPtrs, SpGistScanOpaqueData::numberOfOrderBys, IndexScanDescData::opaque, SpGistScanOpaqueData::orderByTypes, pfree(), SpGistScanOpaqueData::recheck, SpGistScanOpaqueData::recheckDistances, SpGistScanOpaqueData::reconTups, spgWalk(), storeGettuple(), SpGistScanOpaqueData::want_itup, IndexScanDescData::xs_heaptid, IndexScanDescData::xs_hitup, IndexScanDescData::xs_recheck, and IndexScanDescData::xs_want_itup.
Referenced by spghandler().
bool spginsert | ( | Relation | index, |
Datum * | values, | ||
bool * | isnull, | ||
ItemPointer | ht_ctid, | ||
Relation | heapRel, | ||
IndexUniqueCheck | checkUnique, | ||
bool | indexUnchanged, | ||
struct IndexInfo * | indexInfo | ||
) |
Definition at line 183 of file spginsert.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, CurrentMemoryContext, initSpGistState(), MemoryContextDelete(), MemoryContextReset(), MemoryContextSwitchTo(), spgdoinsert(), SpGistUpdateMetaPage(), and values.
Referenced by spghandler().
Definition at line 752 of file spgutils.c.
References build_reloptions(), fillfactor, lengthof, RELOPT_KIND_SPGIST, and RELOPT_TYPE_INT.
Referenced by spghandler().
void spgrescan | ( | IndexScanDesc | scan, |
ScanKey | scankey, | ||
int | nscankeys, | ||
ScanKey | orderbys, | ||
int | norderbys | ||
) |
Definition at line 380 of file spgscan.c.
References FmgrInfo::fn_oid, get_func_rettype(), i, if(), IndexScanDescData::indexRelation, IndexScanDescData::keyData, IndexScanDescData::numberOfKeys, IndexScanDescData::numberOfOrderBys, IndexScanDescData::opaque, IndexScanDescData::orderByData, SpGistScanOpaqueData::orderByTypes, pgstat_count_index_scan, resetSpGistScanOpaque(), ScanKeyData::sk_func, and spgPrepareScanKeys().
Referenced by spghandler().
IndexBulkDeleteResult* spgvacuumcleanup | ( | IndexVacuumInfo * | info, |
IndexBulkDeleteResult * | stats | ||
) |
Definition at line 947 of file spgvacuum.c.
References IndexVacuumInfo::analyze_only, spgBulkDeleteState::callback, spgBulkDeleteState::callback_state, dummy_callback(), IndexVacuumInfo::estimated_count, spgBulkDeleteState::info, IndexVacuumInfo::num_heap_tuples, IndexBulkDeleteResult::num_index_tuples, palloc0(), spgvacuumscan(), and spgBulkDeleteState::stats.
Referenced by spghandler().
Definition at line 39 of file spgvalidate.c.
References spgConfigIn::attType, check_amop_signature(), check_amoptsproc_signature(), check_amproc_signature(), elog, ereport, errcode(), errmsg(), ERROR, format_operator(), format_procedure(), format_type_be(), OpFamilyOpFuncGroup::functionset, get_op_rettype(), GETSTRUCT, HeapTupleIsValid, i, identify_opfamily_groups(), INFO, InvalidOid, spgConfigOut::leafType, OpFamilyOpFuncGroup::lefttype, lfirst, catclist::members, catclist::n_members, NameStr, ObjectIdGetDatum(), OidFunctionCall2, OidIsValid, OpFamilyOpFuncGroup::operatorset, opfamily_can_sort_type(), PointerGetDatum(), ReleaseCatCacheList(), ReleaseSysCache(), OpFamilyOpFuncGroup::righttype, SearchSysCache1(), SearchSysCacheList1, SPGIST_CHOOSE_PROC, SPGIST_COMPRESS_PROC, SPGIST_CONFIG_PROC, SPGIST_INNER_CONSISTENT_PROC, SPGIST_LEAF_CONSISTENT_PROC, SPGIST_OPTIONS_PROC, SPGIST_PICKSPLIT_PROC, SPGISTNProc, and catctup::tuple.
Referenced by spghandler().