PostgreSQL Source Code: contrib/btree_gist/btree_int2.c Source File (original) (raw)
1
2
3
5
11
17
18
28
29
30static bool
32{
33 return (*((const int16 *) a) > *((const int16 *) b));
34}
35static bool
37{
38 return (*((const int16 *) a) >= *((const int16 *) b));
39}
40static bool
42{
43 return (*((const int16 *) a) == *((const int16 *) b));
44}
45static bool
47{
48 return (*((const int16 *) a) <= *((const int16 *) b));
49}
50static bool
52{
53 return (*((const int16 *) a) < *((const int16 *) b));
54}
55
56static int
58{
61
62 if (ia->lower == ib->lower)
63 {
64 if (ia->upper == ib->upper)
65 return 0;
66
67 return (ia->upper > ib->upper) ? 1 : -1;
68 }
69
70 return (ia->lower > ib->lower) ? 1 : -1;
71}
72
78
79
93
94
98{
103
108 errmsg("smallint out of range")));
109
111
113}
114
115
116
117
118
119
127
135
138{
142#ifdef NOT_USED
144#endif
148
149
150 *recheck = false;
151
154
157}
158
161{
164#ifdef NOT_USED
166#endif
169
172
174 &tinfo, fcinfo->flinfo));
175}
176
186
198
201{
204 &tinfo, fcinfo->flinfo));
205}
206
217
218static int
220{
223
224
225 if (arg1->lower < arg2->lower)
226 return -1;
227 else if (arg1->lower > arg2->lower)
228 return 1;
229 else
230 return 0;
231}
232
static bool gbt_int2lt(const void *a, const void *b, FmgrInfo *flinfo)
static bool gbt_int2le(const void *a, const void *b, FmgrInfo *flinfo)
Datum gbt_int2_fetch(PG_FUNCTION_ARGS)
Datum gbt_int2_same(PG_FUNCTION_ARGS)
static int gbt_int2key_cmp(const void *a, const void *b, FmgrInfo *flinfo)
Datum gbt_int2_sortsupport(PG_FUNCTION_ARGS)
Datum gbt_int2_union(PG_FUNCTION_ARGS)
Datum gbt_int2_consistent(PG_FUNCTION_ARGS)
static bool gbt_int2ge(const void *a, const void *b, FmgrInfo *flinfo)
static bool gbt_int2gt(const void *a, const void *b, FmgrInfo *flinfo)
static bool gbt_int2eq(const void *a, const void *b, FmgrInfo *flinfo)
Datum gbt_int2_compress(PG_FUNCTION_ARGS)
static const gbtree_ninfo tinfo
Datum gbt_int2_distance(PG_FUNCTION_ARGS)
static int gbt_int2_ssup_cmp(Datum x, Datum y, SortSupport ssup)
Datum gbt_int2_penalty(PG_FUNCTION_ARGS)
Datum gbt_int2_picksplit(PG_FUNCTION_ARGS)
Datum int2_dist(PG_FUNCTION_ARGS)
static float8 gbt_int2_dist(const void *a, const void *b, FmgrInfo *flinfo)
GISTENTRY * gbt_num_compress(GISTENTRY *entry, const gbtree_ninfo *tinfo)
float8 gbt_num_distance(const GBT_NUMKEY_R *key, const void *query, bool is_leaf, const gbtree_ninfo *tinfo, FmgrInfo *flinfo)
bool gbt_num_consistent(const GBT_NUMKEY_R *key, const void *query, const StrategyNumber *strategy, bool is_leaf, const gbtree_ninfo *tinfo, FmgrInfo *flinfo)
bool gbt_num_same(const GBT_NUMKEY *a, const GBT_NUMKEY *b, const gbtree_ninfo *tinfo, FmgrInfo *flinfo)
GISTENTRY * gbt_num_fetch(GISTENTRY *entry, const gbtree_ninfo *tinfo)
GIST_SPLITVEC * gbt_num_picksplit(const GistEntryVector *entryvec, GIST_SPLITVEC *v, const gbtree_ninfo *tinfo, FmgrInfo *flinfo)
void * gbt_num_union(GBT_NUMKEY *out, const GistEntryVector *entryvec, const gbtree_ninfo *tinfo, FmgrInfo *flinfo)
#define penalty_num(result, olower, oupper, nlower, nupper)
#define GET_FLOAT_DISTANCE(t, arg1, arg2)
int errcode(int sqlerrcode)
#define ereport(elevel,...)
#define PG_RETURN_FLOAT8(x)
#define PG_GETARG_POINTER(n)
#define PG_FUNCTION_INFO_V1(funcname)
#define PG_GETARG_UINT16(n)
#define PG_RETURN_INT16(x)
#define PG_RETURN_POINTER(x)
#define PG_RETURN_BOOL(x)
#define PG_GETARG_INT16(n)
static bool pg_sub_s16_overflow(int16 a, int16 b, int16 *result)
static Pointer DatumGetPointer(Datum X)
struct SortSupportData * SortSupport
int(* comparator)(Datum x, Datum y, SortSupport ssup)