PostgreSQL Source Code git master
|
#include "postgres.h"
#include <math.h>
#include <limits.h>
#include <float.h>
#include "btree_gist.h"
#include "btree_utils_var.h"
#include "mb/pg_wchar.h"
#include "utils/rel.h"
Go to the source code of this file.
Data Structures | |
struct | Vsrt |
struct | gbt_vsrt_arg |
|
static |
Definition at line 168 of file btree_utils_var.c.
References VARDATA, VARHDRSZ, and VARSIZE.
Referenced by gbt_var_node_pf_match(), and gbt_var_penalty().
void gbt_var_bin_union | ( | Datum * | u, |
GBT_VARKEY * | e, | ||
Oid | collation, | ||
const gbtree_vinfo * | tinfo, | ||
FmgrInfo * | flinfo | ||
) |
Definition at line 232 of file btree_utils_var.c.
References DatumGetPointer(), gbtree_vinfo::f_cmp, gbt_var_key_copy(), gbt_var_key_readable(), gbt_var_leaf2node(), GBT_VARKEY_R::lower, PointerGetDatum(), tinfo, and GBT_VARKEY_R::upper.
Referenced by gbt_numeric_penalty(), gbt_var_penalty(), gbt_var_picksplit(), and gbt_var_union().
GISTENTRY * gbt_var_compress | ( | GISTENTRY * | entry, |
const gbtree_vinfo * | tinfo | ||
) |
Definition at line 280 of file btree_utils_var.c.
References gbt_var_key_from_datum(), gistentryinit, GISTENTRY::key, GISTENTRY::leafkey, GISTENTRY::offset, GISTENTRY::page, palloc(), PG_DETOAST_DATUM, PointerGetDatum(), and GISTENTRY::rel.
Referenced by gbt_bit_compress(), gbt_bytea_compress(), gbt_numeric_compress(), and gbt_text_compress().
bool gbt_var_consistent | ( | GBT_VARKEY_R * | key, |
const void * | query, | ||
StrategyNumber | strategy, | ||
Oid | collation, | ||
bool | is_leaf, | ||
const gbtree_vinfo * | tinfo, | ||
FmgrInfo * | flinfo | ||
) |
Definition at line 553 of file btree_utils_var.c.
References BTEqualStrategyNumber, BTGreaterEqualStrategyNumber, BTGreaterStrategyNumber, BTLessEqualStrategyNumber, BTLessStrategyNumber, BtreeGistNotEqualStrategyNumber, gbtree_vinfo::f_cmp, gbtree_vinfo::f_eq, gbtree_vinfo::f_ge, gbtree_vinfo::f_gt, gbtree_vinfo::f_le, gbtree_vinfo::f_lt, gbt_var_node_pf_match(), sort-test::key, and tinfo.
Referenced by gbt_bit_consistent(), gbt_bpchar_consistent(), gbt_bytea_consistent(), gbt_numeric_consistent(), and gbt_text_consistent().
Datum gbt_var_decompress | ( | PG_FUNCTION_ARGS | ) |
Definition at line 35 of file btree_utils_var.c.
References DatumGetPointer(), gistentryinit, GISTENTRY::key, sort-test::key, GISTENTRY::offset, GISTENTRY::page, palloc(), PG_DETOAST_DATUM, PG_GETARG_POINTER, PG_RETURN_POINTER, PointerGetDatum(), and GISTENTRY::rel.
Datum gbt_var_fetch | ( | PG_FUNCTION_ARGS | ) |
Definition at line 304 of file btree_utils_var.c.
References gbt_var_key_readable(), gistentryinit, GISTENTRY::key, sort-test::key, GBT_VARKEY_R::lower, GISTENTRY::offset, GISTENTRY::page, palloc(), PG_DETOAST_DATUM, PG_GETARG_POINTER, PG_RETURN_POINTER, PointerGetDatum(), and GISTENTRY::rel.
GBT_VARKEY * gbt_var_key_copy | ( | const GBT_VARKEY_R * | u | ) |
Definition at line 89 of file btree_utils_var.c.
References INTALIGN, GBT_VARKEY_R::lower, palloc0(), SET_VARSIZE, GBT_VARKEY_R::upper, VARDATA, VARHDRSZ, and VARSIZE.
Referenced by gbt_bit_l2n(), gbt_numeric_penalty(), gbt_var_bin_union(), and gbt_var_union().
|
static |
Definition at line 73 of file btree_utils_var.c.
References palloc(), SET_VARSIZE, VARDATA, VARHDRSZ, and VARSIZE.
Referenced by gbt_var_compress().
GBT_VARKEY_R gbt_var_key_readable | ( | const GBT_VARKEY * | k | ) |
Definition at line 56 of file btree_utils_var.c.
References INTALIGN, GBT_VARKEY_R::lower, GBT_VARKEY_R::upper, VARHDRSZ, and VARSIZE.
Referenced by gbt_bit_consistent(), gbt_bit_l2n(), gbt_bpchar_consistent(), gbt_bytea_consistent(), gbt_numeric_consistent(), gbt_numeric_penalty(), gbt_text_consistent(), gbt_var_bin_union(), gbt_var_fetch(), gbt_var_node_cp_len(), gbt_var_node_truncate(), gbt_var_penalty(), gbt_var_picksplit(), gbt_var_same(), gbt_var_union(), and gbt_vsrt_cmp().
|
static |
Definition at line 105 of file btree_utils_var.c.
References gbtree_vinfo::f_l2n, and tinfo.
Referenced by gbt_var_bin_union(), gbt_var_penalty(), and gbt_var_picksplit().
|
static |
Definition at line 120 of file btree_utils_var.c.
References gbtree_vinfo::eml, gbt_var_key_readable(), i, GBT_VARKEY_R::lower, Min, p2, pg_mblen(), tinfo, GBT_VARKEY_R::upper, VARDATA, VARHDRSZ, and VARSIZE.
Referenced by gbt_var_penalty(), gbt_var_picksplit(), and gbt_var_union().
|
static |
Definition at line 190 of file btree_utils_var.c.
References gbt_bytea_pf_match(), GBT_VARKEY_R::lower, tinfo, gbtree_vinfo::trnc, and GBT_VARKEY_R::upper.
Referenced by gbt_var_consistent().
|
static |
Definition at line 203 of file btree_utils_var.c.
References gbt_var_key_readable(), INTALIGN, GBT_VARKEY_R::lower, Min, palloc0(), SET_VARSIZE, GBT_VARKEY_R::upper, VARDATA, VARHDRSZ, and VARSIZE.
Referenced by gbt_var_picksplit(), and gbt_var_union().
float * gbt_var_penalty | ( | float * | res, |
const GISTENTRY * | o, | ||
const GISTENTRY * | n, | ||
Oid | collation, | ||
const gbtree_vinfo * | tinfo, | ||
FmgrInfo * | flinfo | ||
) |
Definition at line 377 of file btree_utils_var.c.
References DatumGetPointer(), gbtree_vinfo::f_cmp, gbt_bytea_pf_match(), gbt_var_bin_union(), gbt_var_key_readable(), gbt_var_leaf2node(), gbt_var_node_cp_len(), GISTENTRY::key, GBT_VARKEY_R::lower, TupleDescData::natts, PointerGetDatum(), RelationData::rd_att, GISTENTRY::rel, res, tinfo, GBT_VARKEY_R::upper, VARDATA, VARHDRSZ, and VARSIZE.
Referenced by gbt_bit_penalty(), gbt_bytea_penalty(), and gbt_text_penalty().
GIST_SPLITVEC * gbt_var_picksplit | ( | const GistEntryVector * | entryvec, |
GIST_SPLITVEC * | v, | ||
Oid | collation, | ||
const gbtree_vinfo * | tinfo, | ||
FmgrInfo * | flinfo | ||
) |
Definition at line 457 of file btree_utils_var.c.
References gbt_vsrt_arg::collation, cur, DatumGetPointer(), FirstOffsetNumber, gbt_vsrt_arg::flinfo, gbt_var_bin_union(), gbt_var_key_readable(), gbt_var_leaf2node(), gbt_var_node_cp_len(), gbt_var_node_truncate(), gbt_vsrt_cmp(), Vsrt::i, i, GISTENTRY::key, GBT_VARKEY_R::lower, Max, GistEntryVector::n, OffsetNumberNext, palloc(), PointerGetDatum(), qsort_arg(), GIST_SPLITVEC::spl_ldatum, GIST_SPLITVEC::spl_left, GIST_SPLITVEC::spl_nleft, GIST_SPLITVEC::spl_nright, GIST_SPLITVEC::spl_rdatum, GIST_SPLITVEC::spl_right, Vsrt::t, tinfo, gbt_vsrt_arg::tinfo, gbtree_vinfo::trnc, GBT_VARKEY_R::upper, and GistEntryVector::vector.
Referenced by gbt_bit_picksplit(), gbt_bytea_picksplit(), gbt_numeric_picksplit(), and gbt_text_picksplit().
bool gbt_var_same | ( | Datum | d1, |
Datum | d2, | ||
Oid | collation, | ||
const gbtree_vinfo * | tinfo, | ||
FmgrInfo * | flinfo | ||
) |
Definition at line 360 of file btree_utils_var.c.
References DatumGetPointer(), gbtree_vinfo::f_cmp, gbt_var_key_readable(), GBT_VARKEY_R::lower, tinfo, and GBT_VARKEY_R::upper.
Referenced by gbt_bit_same(), gbt_bytea_same(), gbt_numeric_same(), and gbt_text_same().
GBT_VARKEY * gbt_var_union | ( | const GistEntryVector * | entryvec, |
int32 * | size, | ||
Oid | collation, | ||
const gbtree_vinfo * | tinfo, | ||
FmgrInfo * | flinfo | ||
) |
Definition at line 321 of file btree_utils_var.c.
References cur, DatumGetPointer(), gbt_var_bin_union(), gbt_var_key_copy(), gbt_var_key_readable(), gbt_var_node_cp_len(), gbt_var_node_truncate(), i, GISTENTRY::key, GistEntryVector::n, PointerGetDatum(), size, tinfo, gbtree_vinfo::trnc, and GistEntryVector::vector.
Referenced by gbt_bit_union(), gbt_bytea_union(), gbt_numeric_union(), and gbt_text_union().
|
static |
Definition at line 442 of file btree_utils_var.c.
References a, arg, b, gbt_vsrt_arg::collation, gbtree_vinfo::f_cmp, gbt_vsrt_arg::flinfo, gbt_var_key_readable(), GBT_VARKEY_R::lower, res, gbt_vsrt_arg::tinfo, and GBT_VARKEY_R::upper.
Referenced by gbt_var_picksplit().
PG_FUNCTION_INFO_V1 | ( | gbt_var_decompress | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_var_fetch | ) |