MobilityDB 1.1
Data Structures | Macros | Functions
span_gist.c File Reference
#include "pg_general/span_gist.h"
#include <assert.h>
#include <float.h>
#include <access/gist.h>
#include <utils/timestamp.h>
#include <meos.h>
#include <meos_internal.h>
#include "general/set.h"
#include "general/spanset.h"
#include "general/temporal.h"
#include "pg_general/meos_catalog.h"
#include "pg_general/temporal.h"
Include dependency graph for span_gist.c:

Data Structures

struct  ConsiderSplitContext
 R-tree GiST index for temporal integers and temporal floats. More...
 
struct  SpanBounds
 Structure keeping the bounds extracted from a span, for use in the function span_gist_double_sorting_split. More...
 

Macros

#define PLACE_LEFT(span, off)
 
#define PLACE_RIGHT(span, off)
 

Functions

int common_entry_cmp (const void *i1, const void *i2)
 Compare CommonEntrys by their deltas. More...
 
PGDLLEXPORT Datum Set_gist_compress (PG_FUNCTION_ARGS)
 GiST compress method for timestamp sets. More...
 
static void span_gist_consider_split (ConsiderSplitContext *context, SpanBound *right_lower, int min_left_count, SpanBound *left_upper, int max_left_count)
 Consider replacement of currently selected split with a better one during span_gist_double_sorting_split. More...
 
bool span_gist_consistent (const Span *key, const Span *query, StrategyNumber strategy)
 GiST internal-page consistency for span types. More...
 
PGDLLEXPORT Datum Span_gist_consistent (PG_FUNCTION_ARGS)
 GiST consistent method for span types. More...
 
PGDLLEXPORT Datum Span_gist_distance (PG_FUNCTION_ARGS)
 GiST support function. More...
 
static void span_gist_double_sorting_split (GistEntryVector *entryvec, GIST_SPLITVEC *v)
 Double sorting split algorithm. More...
 
static void span_gist_fallback_split (GistEntryVector *entryvec, GIST_SPLITVEC *v)
 Trivial split: half of entries will be placed on one page and the other half on the other page. More...
 
PGDLLEXPORT Datum Span_gist_fetch (PG_FUNCTION_ARGS)
 GiST fetch method for span types (result in a span) More...
 
static bool span_gist_get_span (FunctionCallInfo fcinfo, Span *result, Oid typid)
 Transform the query argument into a span. More...
 
PGDLLEXPORT Datum Span_gist_penalty (PG_FUNCTION_ARGS)
 GiST page split penalty function for spans. More...
 
PGDLLEXPORT Datum Span_gist_picksplit (PG_FUNCTION_ARGS)
 GiST picksplit method for span types. More...
 
PGDLLEXPORT Datum Span_gist_same (PG_FUNCTION_ARGS)
 GiST same method for span types. More...
 
PGDLLEXPORT Datum Span_gist_union (PG_FUNCTION_ARGS)
 GiST union method for span types. More...
 
bool span_index_consistent_leaf (const Span *key, const Span *query, StrategyNumber strategy)
 R-tree GiST index for span and span set types. More...
 
bool span_index_recheck (StrategyNumber strategy)
 Return true if a recheck is necessary depending on the strategy. More...
 
static int spanbounds_cmp_lower (const void *a, const void *b)
 Compare SpanBounds by lower bound. More...
 
static int spanbounds_cmp_upper (const void *a, const void *b)
 Compare SpanBounds by upper bound. More...
 
PGDLLEXPORT Datum Spanset_gist_compress (PG_FUNCTION_ARGS)
 GiST compress method for span sets. More...