PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | GISTIntArrayOptions |
struct | GISTIntArrayBigOptions |
struct | GISTTYPE |
struct | ITEM |
struct | QUERYTYPE |
Macros | |
#define | G_INT_NUMRANGES_DEFAULT 100 |
#define | G_INT_NUMRANGES_MAX |
#define | G_INT_GET_NUMRANGES() |
#define | ARRPTR(x) ( (int32 *) ARR_DATA_PTR(x) ) |
#define | ARRNELEMS(x) ArrayGetNItems(ARR_NDIM(x), ARR_DIMS(x)) |
#define | CHECKARRVALID(x) |
#define | ARRISEMPTY(x) (ARRNELEMS(x) == 0) |
#define | SORT(x) |
#define | PREPAREARR(x) |
#define | WISH_F(a, b, c) (double)( -(double)(((a)-(b))*((a)-(b))*((a)-(b)))*(c) ) |
#define | SIGLEN_DEFAULT (63 * 4) |
#define | SIGLEN_MAX GISTMaxIndexKeySize |
#define | SIGLENBIT(siglen) ((siglen) * BITS_PER_BYTE) |
#define | GET_SIGLEN() |
#define | LOOPBYTE(siglen) for (i = 0; i < siglen; i++) |
#define | GETBYTE(x, i) ( *( (BITVECP)(x) + (int)( (i) / BITS_PER_BYTE ) ) ) |
#define | GETBITBYTE(x, i) ( (*((char*)(x)) >> (i)) & 0x01 ) |
#define | CLRBIT(x, i) GETBYTE(x,i) &= ~( 0x01 << ( (i) % BITS_PER_BYTE ) ) |
#define | SETBIT(x, i) GETBYTE(x,i) |= ( 0x01 << ( (i) % BITS_PER_BYTE ) ) |
#define | GETBIT(x, i) ( (GETBYTE(x,i) >> ( (i) % BITS_PER_BYTE )) & 0x01 ) |
#define | HASHVAL(val, siglen) (((unsigned int)(val)) % SIGLENBIT(siglen)) |
#define | HASH(sign, val, siglen) SETBIT((sign), HASHVAL(val, siglen)) |
#define | ALLISTRUE 0x04 |
#define | ISALLTRUE(x) ( ((GISTTYPE*)x)->flag & ALLISTRUE ) |
#define | GTHDRSIZE (VARHDRSZ + sizeof(int32)) |
#define | CALCGTSIZE(flag, siglen) ( GTHDRSIZE+(((flag) & ALLISTRUE) ? 0 : (siglen)) ) |
#define | GETSIGN(x) ( (BITVECP)( (char*)x+GTHDRSIZE ) ) |
#define | BooleanSearchStrategy 20 |
#define | HDRSIZEQT offsetof(QUERYTYPE, items) |
#define | COMPUTESIZE(size) ( HDRSIZEQT + (size) * sizeof(ITEM) ) |
#define | QUERYTYPEMAXITEMS ((MaxAllocSize - HDRSIZEQT) / sizeof(ITEM)) |
#define | GETQUERY(x) ( (x)->items ) |
#define | END 0 |
#define | ERR 1 |
#define | VAL 2 |
#define | OPR 3 |
#define | OPEN 4 |
#define | CLOSE 5 |
#define | DatumGetQueryTypeP(X) ((QUERYTYPE *) PG_DETOAST_DATUM(X)) |
#define | DatumGetQueryTypePCopy(X) ((QUERYTYPE *) PG_DETOAST_DATUM_COPY(X)) |
#define | PG_GETARG_QUERYTYPE_P(n) DatumGetQueryTypeP(PG_GETARG_DATUM(n)) |
#define | PG_GETARG_QUERYTYPE_P_COPY(n) DatumGetQueryTypePCopy(PG_GETARG_DATUM(n)) |
#define | QSORT(a, direction) |
Typedefs | |
typedef char * | BITVECP |
typedef struct ITEM | ITEM |
typedef struct QUERYTYPE | QUERYTYPE |
#define ARRISEMPTY | ( | x | ) | (ARRNELEMS(x) == 0) |
Definition at line 38 of file _int.h.
Referenced by _int_overlap(), g_int_compress(), g_int_decompress(), g_intbig_compress(), inner_int_inter(), inner_int_union(), intarray_del_elem(), and subarray().
#define ARRNELEMS | ( | x | ) | ArrayGetNItems(ARR_NDIM(x), ARR_DIMS(x)) |
#define ARRPTR | ( | x | ) | ( (int32 *) ARR_DATA_PTR(x) ) |
#define BooleanSearchStrategy 20 |
Definition at line 134 of file _int.h.
Referenced by g_int_consistent(), g_intbig_consistent(), ginint4_consistent(), and ginint4_queryextract().
#define CHECKARRVALID | ( | x | ) |
Definition at line 30 of file _int.h.
Referenced by _int_contains(), _int_inter(), _int_overlap(), _int_same(), _int_union(), _intbig_contains(), _intbig_overlap(), boolop(), execconsistent(), g_int_compress(), g_int_consistent(), g_int_decompress(), g_int_same(), g_int_union(), g_intbig_compress(), g_intbig_consistent(), ginint4_queryextract(), idx(), inner_int_union(), intarray_add_elem(), intarray_concat_arrays(), intarray_del_elem(), intarray_match_first(), intset_subtract(), sort(), sort_asc(), sort_desc(), subarray(), and uniq().
#define CLOSE 5 |
Definition at line 165 of file _int.h.
Referenced by gettoken(), gettoken_query(), and makepol().
Definition at line 155 of file _int.h.
Referenced by bqarr_in(), cleanup_tsquery_stopwords(), parse_tsquery(), QTN2QT(), and queryin().
#define DatumGetQueryTypeP | ( | X | ) | ((QUERYTYPE *) PG_DETOAST_DATUM(X)) |
Definition at line 168 of file _int.h.
Referenced by _int_matchsel().
#define DatumGetQueryTypePCopy | ( | X | ) | ((QUERYTYPE *) PG_DETOAST_DATUM_COPY(X)) |
#define END 0 |
Definition at line 160 of file _int.h.
Referenced by gettoken(), gettoken_query(), makepol(), and next().
#define ERR 1 |
Definition at line 161 of file _int.h.
Referenced by cclasscvec(), element(), getcvec(), gettoken(), gettoken_query(), lacon(), lexdigits(), lookupcclass(), makepol(), miss(), newdfa(), newnfa(), pickss(), prefixes(), and range().
#define G_INT_GET_NUMRANGES | ( | ) |
Definition at line 14 of file _int.h.
Referenced by g_int_compress(), and g_int_decompress().
#define G_INT_NUMRANGES_DEFAULT 100 |
Definition at line 11 of file _int.h.
Referenced by g_int_options().
#define G_INT_NUMRANGES_MAX |
Definition at line 12 of file _int.h.
Referenced by g_int_options().
#define GET_SIGLEN | ( | ) |
#define GETBIT | ( | x, | |
i | |||
) | ( (GETBYTE(x,i) >> ( (i) % BITS_PER_BYTE )) & 0x01 ) |
#define GETBYTE | ( | x, | |
i | |||
) | ( *( (BITVECP)(x) + (int)( (i) / BITS_PER_BYTE ) ) ) |
#define GETQUERY | ( | x | ) | ( (x)->items ) |
Definition at line 157 of file _int.h.
Referenced by _int_matchsel(), boolop(), bqarr_in(), bqarr_out(), calc_rank(), cleanup_tsquery_stopwords(), collectTSQueryValues(), CompareTSQ(), Cover(), execconsistent(), get_docrep(), gin_bool_consistent(), gin_extract_tsquery(), gin_tsquery_consistent(), gin_tsquery_triconsistent(), ginint4_queryextract(), gist_qtxt(), gtsvector_consistent(), hlCover(), hlfinditem(), join_tsqueries(), ltxtq_exec(), ltxtq_out(), ltxtq_send(), makeTSQuerySign(), mcelem_tsquery_selec(), parse_tsquery(), QTN2QT(), query_has_required_values(), queryin(), signconsistent(), SortAndUniqItems(), ts_match_vq(), tsquery_not(), tsquery_rewrite(), tsquery_rewrite_query(), tsqueryout(), tsqueryrecv(), tsquerysend(), and tsquerytree().
#define OPEN 4 |
Definition at line 164 of file _int.h.
Referenced by gettoken(), gettoken_query(), and makepol().
#define OPR 3 |
Definition at line 163 of file _int.h.
Referenced by bqarr_in(), findoprnd(), gettoken(), gettoken_query(), infix(), int_query_opr_selec(), and makepol().
#define PG_GETARG_QUERYTYPE_P | ( | n | ) | DatumGetQueryTypeP(PG_GETARG_DATUM(n)) |
Definition at line 170 of file _int.h.
Referenced by boolop(), bqarr_out(), ginint4_consistent(), and ginint4_queryextract().
#define PG_GETARG_QUERYTYPE_P_COPY | ( | n | ) | DatumGetQueryTypePCopy(PG_GETARG_DATUM(n)) |
#define PREPAREARR | ( | x | ) |
Definition at line 49 of file _int.h.
Referenced by _int_contains(), boolop(), g_int_compress(), and g_int_consistent().
#define QSORT | ( | a, | |
direction | |||
) |
Definition at line 183 of file _int.h.
Referenced by g_int_union(), intset_subtract(), intset_union_elem(), sort(), sort_asc(), and sort_desc().
#define QUERYTYPEMAXITEMS ((MaxAllocSize - HDRSIZEQT) / sizeof(ITEM)) |
Definition at line 156 of file _int.h.
Referenced by bqarr_in().
#define SIGLEN_MAX GISTMaxIndexKeySize |
#define SIGLENBIT | ( | siglen | ) | ((siglen) * BITS_PER_BYTE) |
#define SORT | ( | x | ) |
Definition at line 41 of file _int.h.
Referenced by _int_inter(), _int_overlap(), _int_same(), and _int_union().
#define VAL 2 |
Definition at line 162 of file _int.h.
Referenced by contains_required_value(), execute(), findoprnd(), gettoken(), gettoken_query(), gin_bool_consistent(), ginint4_queryextract(), infix(), int_query_opr_selec(), ltree_execute(), and makepol().
Definition at line 310 of file _int_tool.c.
References ARRNELEMS, ARRPTR, isort_cmp(), qunique_arg(), and resize_intArrayType().
Referenced by g_int_union(), inner_int_union(), intset_subtract(), intset_union_elem(), and uniq().
int compASC | ( | const void * | a, |
const void * | b | ||
) |
int compDESC | ( | const void * | a, |
const void * | b | ||
) |
Definition at line 280 of file _int_tool.c.
References ARRNELEMS, ARRPTR, and new_intArrayType().
Referenced by g_int_picksplit(), and inner_int_union().
Definition at line 309 of file _int_bool.c.
References CHKVAL::arrb, CHKVAL::arre, ARRNELEMS, ARRPTR, CHECKARRVALID, checkcondition_arr(), execute(), GETQUERY, and QUERYTYPE::size.
Referenced by g_int_consistent().
void gensign | ( | BITVECP | sign, |
int * | a, | ||
int | len, | ||
int | siglen | ||
) |
Definition at line 322 of file _int_tool.c.
Definition at line 336 of file _int_bool.c.
References checkcondition_gin(), execute(), GinChkVal::first, GETQUERY, i, GinChkVal::mapped_check, palloc(), QUERYTYPE::size, NODE::type, and VAL.
Referenced by ginint4_consistent().
Definition at line 14 of file _int_tool.c.
References ARRNELEMS, ARRPTR, i, and true.
Referenced by _int_contains(), and g_int_consistent().
Definition at line 135 of file _int_tool.c.
References ARRISEMPTY, ARRNELEMS, ARRPTR, i, Min, new_intArrayType(), pfree(), and resize_intArrayType().
Referenced by _int_inter(), and g_int_picksplit().
Definition at line 49 of file _int_tool.c.
References ARRNELEMS, ARRPTR, and i.
Referenced by _int_overlap(), and g_int_consistent().
Definition at line 78 of file _int_tool.c.
References _int_unique(), ARRISEMPTY, ARRNELEMS, ARRPTR, CHECKARRVALID, copy_intArrayType(), i, new_intArrayType(), and resize_intArrayType().
Referenced by _int_union(), g_int_penalty(), and g_int_picksplit().
Definition at line 385 of file _int_tool.c.
References ARRPTR, and new_intArrayType().
Referenced by intset().
Definition at line 351 of file _int_tool.c.
References ARRNELEMS, ARRPTR, CHECKARRVALID, and new_intArrayType().
Referenced by intarray_push_elem(), and intset_union_elem().
Definition at line 368 of file _int_tool.c.
References ARRNELEMS, ARRPTR, CHECKARRVALID, and new_intArrayType().
Referenced by intarray_push_array().
Definition at line 335 of file _int_tool.c.
References ARRNELEMS, ARRPTR, CHECKARRVALID, and i.
Referenced by idx().
int internal_size | ( | int * | a, |
int | len | ||
) |
Definition at line 292 of file _int_tool.c.
References i.
Referenced by g_int_compress(), and g_int_decompress().
Definition at line 211 of file _int_tool.c.
References isort_cmp(), and qsort_arg().
ArrayType* new_intArrayType | ( | int | num | ) |
Definition at line 221 of file _int_tool.c.
References ARR_DIMS, ARR_ELEMTYPE, ARR_LBOUND, ARR_NDIM, ARR_OVERHEAD_NONULLS, Assert, construct_empty_array(), ArrayType::dataoffset, palloc0(), and SET_VARSIZE.
Referenced by copy_intArrayType(), g_int_decompress(), g_int_union(), inner_int_inter(), inner_int_union(), int_to_intset(), intarray_add_elem(), intarray_concat_arrays(), intset_subtract(), and subarray().
Definition at line 399 of file _int_bool.c.
References contains_required_value(), GETQUERY, and QUERYTYPE::size.
Referenced by ginint4_queryextract().
Definition at line 249 of file _int_tool.c.
References ARR_DATA_OFFSET, ARR_DIMS, ARR_NDIM, ARRNELEMS, Assert, construct_empty_array(), i, repalloc(), and SET_VARSIZE.
Referenced by _int_unique(), g_int_compress(), inner_int_inter(), inner_int_union(), intarray_del_elem(), and intset_subtract().
void rt__int_size | ( | ArrayType * | a, |
float * | size | ||
) |
Definition at line 183 of file _int_tool.c.
References ARRNELEMS.
Referenced by g_int_penalty(), and g_int_picksplit().
Definition at line 300 of file _int_bool.c.
References checkcondition_bit(), execute(), GETQUERY, and QUERYTYPE::size.
Referenced by g_intbig_consistent().