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 CHECKARRVALID | ( | x | ) |
#define DatumGetQueryTypeP | ( | X | ) | ((QUERYTYPE *) PG_DETOAST_DATUM(X)) |
#define DatumGetQueryTypePCopy | ( | X | ) | ((QUERYTYPE *) PG_DETOAST_DATUM_COPY(X)) |
#define G_INT_GET_NUMRANGES | ( | ) |
#define G_INT_NUMRANGES_MAX |
#define GET_SIGLEN | ( | ) |
#define PG_GETARG_QUERYTYPE_P | ( | n | ) | DatumGetQueryTypeP(PG_GETARG_DATUM(n)) |
#define PG_GETARG_QUERYTYPE_P_COPY | ( | n | ) | DatumGetQueryTypePCopy(PG_GETARG_DATUM(n)) |
#define PREPAREARR | ( | x | ) |
#define QSORT | ( | a, | |
direction | |||
) |
#define QUERYTYPEMAXITEMS ((MaxAllocSize - HDRSIZEQT) / sizeof(ITEM)) |
#define SIGLEN_MAX GISTMaxIndexKeySize |
#define SIGLENBIT | ( | siglen | ) | ((siglen) * BITS_PER_BYTE) |
#define SORT | ( | x | ) |
Definition at line 311 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 404 of file _int_tool.c.
References a, b, and pg_cmp_s32().
Definition at line 281 of file _int_tool.c.
References a, ARRNELEMS, ARRPTR, and new_intArrayType().
Referenced by g_int_picksplit(), and inner_int_union().
Definition at line 308 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 323 of file _int_tool.c.
Definition at line 335 of file _int_bool.c.
References checkcondition_gin(), execute(), GinChkVal::first, GETQUERY, i, items, j, GinChkVal::mapped_check, palloc(), QUERYTYPE::size, type, and VAL.
Referenced by ginint4_consistent().
Definition at line 15 of file _int_tool.c.
References a, ARRNELEMS, ARRPTR, b, i, and j.
Referenced by _int_contains(), and g_int_consistent().
Definition at line 136 of file _int_tool.c.
References a, ARRISEMPTY, ARRNELEMS, ARRPTR, b, i, j, Min, new_intArrayType(), pfree(), and resize_intArrayType().
Referenced by _int_inter(), and g_int_picksplit().
Definition at line 50 of file _int_tool.c.
References a, ARRNELEMS, ARRPTR, b, i, and j.
Referenced by _int_overlap(), and g_int_consistent().
Definition at line 79 of file _int_tool.c.
References _int_unique(), a, ARRISEMPTY, ARRNELEMS, ARRPTR, b, CHECKARRVALID, copy_intArrayType(), i, j, new_intArrayType(), and resize_intArrayType().
Referenced by _int_union(), g_int_penalty(), and g_int_picksplit().
Definition at line 386 of file _int_tool.c.
References ARRPTR, and new_intArrayType().
Referenced by intset().
Definition at line 352 of file _int_tool.c.
References a, ARRNELEMS, ARRPTR, CHECKARRVALID, and new_intArrayType().
Referenced by intarray_push_elem(), and intset_union_elem().
Definition at line 369 of file _int_tool.c.
References a, ARRNELEMS, ARRPTR, b, CHECKARRVALID, and new_intArrayType().
Referenced by intarray_push_array().
Definition at line 336 of file _int_tool.c.
References a, ARRNELEMS, ARRPTR, CHECKARRVALID, and i.
Referenced by idx().
int internal_size | ( | int * | a, |
int | len | ||
) |
Definition at line 293 of file _int_tool.c.
References a, i, len, and size.
Referenced by g_int_compress(), and g_int_decompress().
Definition at line 212 of file _int_tool.c.
References a, isort_cmp(), len, and qsort_arg().
ArrayType* new_intArrayType | ( | int | num | ) |
Definition at line 222 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 398 of file _int_bool.c.
References contains_required_value(), GETQUERY, and QUERYTYPE::size.
Referenced by ginint4_queryextract().
Definition at line 250 of file _int_tool.c.
References a, 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 184 of file _int_tool.c.
References a, ARRNELEMS, and size.
Referenced by g_int_penalty(), and g_int_picksplit().
Definition at line 299 of file _int_bool.c.
References checkcondition_bit(), execute(), GETQUERY, sign, and QUERYTYPE::size.
Referenced by g_intbig_consistent().