PostgreSQL Source Code git master
Loading...
Searching...
No Matches
btree_gist.c
Go to the documentation of this file.
1/*
2 * contrib/btree_gist/btree_gist.c
3 */
4#include "postgres.h"
5
6#include "access/cmptype.h"
7#include "access/stratnum.h"
8#include "utils/builtins.h"
9
11 .name = "btree_gist",
12 .version = PG_VERSION
13);
14
19
20/**************************************************
21 * In/Out for keys
22 **************************************************/
23
24
27{
28 Oid typioparam = PG_GETARG_OID(1);
29
32 errmsg("cannot accept a value of type %s",
33 format_type_extended(typioparam, -1,
35
36 PG_RETURN_VOID(); /* keep compiler quiet */
37}
38
41{
42 /* Sadly, we do not receive any indication of the specific type */
45 errmsg("cannot display a value of type %s", "gbtreekey?")));
46
47 PG_RETURN_VOID(); /* keep compiler quiet */
48}
49
50
51/*
52** GiST DeCompress methods
53** do not do anything.
54*/
60
61/*
62 * Returns the btree number for supported operators, otherwise invalid.
63 */
Datum gbt_decompress(PG_FUNCTION_ARGS)
Definition btree_gist.c:56
Datum gbtreekey_out(PG_FUNCTION_ARGS)
Definition btree_gist.c:40
Datum gbtreekey_in(PG_FUNCTION_ARGS)
Definition btree_gist.c:26
Datum gist_translate_cmptype_btree(PG_FUNCTION_ARGS)
Definition btree_gist.c:65
#define FORMAT_TYPE_ALLOW_INVALID
Definition builtins.h:125
CompareType
Definition cmptype.h:32
@ COMPARE_LE
Definition cmptype.h:35
@ COMPARE_GT
Definition cmptype.h:38
@ COMPARE_EQ
Definition cmptype.h:36
@ COMPARE_GE
Definition cmptype.h:37
@ COMPARE_LT
Definition cmptype.h:34
int errcode(int sqlerrcode)
Definition elog.c:863
int errmsg(const char *fmt,...)
Definition elog.c:1080
#define ERROR
Definition elog.h:39
#define ereport(elevel,...)
Definition elog.h:150
#define PG_RETURN_VOID()
Definition fmgr.h:350
#define PG_GETARG_OID(n)
Definition fmgr.h:275
#define PG_GETARG_POINTER(n)
Definition fmgr.h:277
#define PG_MODULE_MAGIC_EXT(...)
Definition fmgr.h:540
#define PG_FUNCTION_INFO_V1(funcname)
Definition fmgr.h:417
#define PG_GETARG_INT32(n)
Definition fmgr.h:269
#define PG_RETURN_UINT16(x)
Definition fmgr.h:358
#define PG_RETURN_POINTER(x)
Definition fmgr.h:363
#define PG_FUNCTION_ARGS
Definition fmgr.h:193
char * format_type_extended(Oid type_oid, int32 typemod, bits16 flags)
uint64_t Datum
Definition postgres.h:70
unsigned int Oid
static int fb(int x)
#define BTGreaterStrategyNumber
Definition stratnum.h:33
#define InvalidStrategy
Definition stratnum.h:24
#define BTLessStrategyNumber
Definition stratnum.h:29
#define BTEqualStrategyNumber
Definition stratnum.h:31
#define BTLessEqualStrategyNumber
Definition stratnum.h:30
#define BTGreaterEqualStrategyNumber
Definition stratnum.h:32
const char * name