mirror of
https://github.com/postgres/postgres.git
synced 2025-07-24 14:22:24 +03:00
config
contrib
adminpack
amcheck
auth_delay
auto_explain
bloom
bool_plperl
btree_gin
btree_gist
data
expected
sql
.gitignore
Makefile
btree_bit.c
btree_bytea.c
btree_cash.c
btree_date.c
btree_enum.c
btree_float4.c
btree_float8.c
btree_gist--1.0--1.1.sql
btree_gist--1.1--1.2.sql
btree_gist--1.2--1.3.sql
btree_gist--1.2.sql
btree_gist--1.3--1.4.sql
btree_gist--1.4--1.5.sql
btree_gist.c
btree_gist.control
btree_gist.h
btree_inet.c
btree_int2.c
btree_int4.c
btree_int8.c
btree_interval.c
btree_macaddr.c
btree_macaddr8.c
btree_numeric.c
btree_oid.c
btree_text.c
btree_time.c
btree_ts.c
btree_utils_num.c
btree_utils_num.h
btree_utils_var.c
btree_utils_var.h
btree_uuid.c
citext
cube
dblink
dict_int
dict_xsyn
earthdistance
file_fdw
fuzzystrmatch
hstore
hstore_plperl
hstore_plpython
intagg
intarray
isn
jsonb_plperl
jsonb_plpython
lo
ltree
ltree_plpython
oid2name
pageinspect
passwordcheck
pg_buffercache
pg_freespacemap
pg_prewarm
pg_standby
pg_stat_statements
pg_trgm
pg_visibility
pgcrypto
pgrowlocks
pgstattuple
postgres_fdw
seg
sepgsql
spi
sslinfo
start-scripts
tablefunc
tcn
test_decoding
tsm_system_rows
tsm_system_time
unaccent
uuid-ossp
vacuumlo
xml2
Makefile
README
contrib-global.mk
doc
src
.dir-locals.el
.editorconfig
.gitattributes
.gitignore
COPYRIGHT
GNUmakefile.in
HISTORY
Makefile
README
README.git
aclocal.m4
configure
configure.in
Similar to commits14aec03502
,7e735035f2
anddddf4cdc33
, this commit makes the order of header file inclusion consistent in more places. Author: Vignesh C Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/CALDaNm2Sznv8RR6Ex-iJO6xAdsxgWhCoETkaYX=+9DW3q0QCfA@mail.gmail.com
73 lines
2.2 KiB
C
73 lines
2.2 KiB
C
/*
|
|
* contrib/btree_gist/btree_utils_var.h
|
|
*/
|
|
#ifndef __BTREE_UTILS_VAR_H__
|
|
#define __BTREE_UTILS_VAR_H__
|
|
|
|
#include "access/gist.h"
|
|
#include "btree_gist.h"
|
|
#include "mb/pg_wchar.h"
|
|
|
|
/* Variable length key */
|
|
typedef bytea GBT_VARKEY;
|
|
|
|
/* Better readable key */
|
|
typedef struct
|
|
{
|
|
bytea *lower,
|
|
*upper;
|
|
} GBT_VARKEY_R;
|
|
|
|
/*
|
|
* type description
|
|
*/
|
|
typedef struct
|
|
{
|
|
|
|
/* Attribs */
|
|
|
|
enum gbtree_type t; /* data type */
|
|
int32 eml; /* cached pg_database_encoding_max_length (0:
|
|
* undefined) */
|
|
bool trnc; /* truncate (=compress) key */
|
|
|
|
/* Methods */
|
|
|
|
bool (*f_gt) (const void *, const void *, Oid, FmgrInfo *); /* greater than */
|
|
bool (*f_ge) (const void *, const void *, Oid, FmgrInfo *); /* greater equal */
|
|
bool (*f_eq) (const void *, const void *, Oid, FmgrInfo *); /* equal */
|
|
bool (*f_le) (const void *, const void *, Oid, FmgrInfo *); /* less equal */
|
|
bool (*f_lt) (const void *, const void *, Oid, FmgrInfo *); /* less than */
|
|
int32 (*f_cmp) (const void *, const void *, Oid, FmgrInfo *); /* compare */
|
|
GBT_VARKEY *(*f_l2n) (GBT_VARKEY *, FmgrInfo *flinfo); /* convert leaf to node */
|
|
} gbtree_vinfo;
|
|
|
|
|
|
|
|
extern GBT_VARKEY_R gbt_var_key_readable(const GBT_VARKEY *k);
|
|
|
|
extern GBT_VARKEY *gbt_var_key_copy(const GBT_VARKEY_R *u);
|
|
|
|
extern GISTENTRY *gbt_var_compress(GISTENTRY *entry, const gbtree_vinfo *tinfo);
|
|
|
|
extern GBT_VARKEY *gbt_var_union(const GistEntryVector *entryvec, int32 *size,
|
|
Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
|
|
|
|
extern bool gbt_var_same(Datum d1, Datum d2, Oid collation,
|
|
const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
|
|
|
|
extern float *gbt_var_penalty(float *res, const GISTENTRY *o, const GISTENTRY *n,
|
|
Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
|
|
|
|
extern bool gbt_var_consistent(GBT_VARKEY_R *key, const void *query,
|
|
StrategyNumber strategy, Oid collation, bool is_leaf,
|
|
const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
|
|
|
|
extern GIST_SPLITVEC *gbt_var_picksplit(const GistEntryVector *entryvec, GIST_SPLITVEC *v,
|
|
Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
|
|
|
|
extern void gbt_var_bin_union(Datum *u, GBT_VARKEY *e, Oid collation,
|
|
const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
|
|
|
|
#endif
|