|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/gist.h"#include "access/reloptions.h"#include "access/stratnum.h"#include "catalog/pg_type.h"#include "common/int.h"#include "hstore.h"#include "utils/pg_crc.h"
Go to the source code of this file.
Data Structures | |
| struct | GistHstoreOptions |
| struct | GISTTYPE |
| struct | SPLITCOST |
Typedefs | |
| typedef char * | BITVECP |
| #define ALLISTRUE 0x04 |
Definition at line 55 of file hstore_gist.c.
| #define BITBYTE 8 |
Definition at line 22 of file hstore_gist.c.
Definition at line 60 of file hstore_gist.c.
Definition at line 42 of file hstore_gist.c.
| #define GET_SIGLEN | ( | ) |
Definition at line 26 of file hstore_gist.c.
Definition at line 44 of file hstore_gist.c.
Definition at line 41 of file hstore_gist.c.
Definition at line 40 of file hstore_gist.c.
| #define GETENTRY | ( | vec, | |
| pos | |||
| ) | ((GISTTYPE *) DatumGetPointer((vec)->vector[(pos)].key)) |
Definition at line 75 of file hstore_gist.c.
Definition at line 62 of file hstore_gist.c.
Definition at line 46 of file hstore_gist.c.
Definition at line 45 of file hstore_gist.c.
Definition at line 57 of file hstore_gist.c.
Definition at line 36 of file hstore_gist.c.
Definition at line 33 of file hstore_gist.c.
Definition at line 43 of file hstore_gist.c.
Definition at line 23 of file hstore_gist.c.
| #define SIGLEN_MAX GISTMaxIndexKeySize |
Definition at line 24 of file hstore_gist.c.
Definition at line 25 of file hstore_gist.c.
Definition at line 64 of file hstore_gist.c.
Definition at line 77 of file hstore_gist.c.
Definition at line 31 of file hstore_gist.c.
Definition at line 358 of file hstore_gist.c.
References a, b, and pg_cmp_s32().
Referenced by ghstore_picksplit().
Definition at line 81 of file hstore_gist.c.
References buf, COMP_TRADITIONAL_CRC32, crc, FIN_TRADITIONAL_CRC32, and INIT_TRADITIONAL_CRC32.
Referenced by ghstore_compress(), and ghstore_consistent().
Definition at line 118 of file hstore_gist.c.
References ALLISTRUE, CALCGTSIZE, fb(), GISTTYPE::flag, flag(), GETSIGN, palloc(), SET_VARSIZE(), and sign.
Referenced by ghstore_compress(), ghstore_picksplit(), and ghstore_union().
| Datum ghstore_compress | ( | PG_FUNCTION_ARGS | ) |
Definition at line 148 of file hstore_gist.c.
References ARRPTR, crc32_sz(), DatumGetHStoreP, DatumGetPointer(), fb(), GET_SIGLEN, GETSIGN, ghstore_alloc(), gistentryinit, HASH, HS_COUNT, HSTORE_KEY, HSTORE_KEYLEN, HSTORE_VAL, HSTORE_VALISNULL, HSTORE_VALLEN, i, ISALLTRUE, GISTENTRY::key, GISTENTRY::leafkey, LOOPBYTE, GISTENTRY::offset, GISTENTRY::page, palloc_object, PG_GETARG_POINTER, PG_RETURN_POINTER, PointerGetDatum(), GISTENTRY::rel, sign, STRPTR, and val.
| Datum ghstore_consistent | ( | PG_FUNCTION_ARGS | ) |
Definition at line 509 of file hstore_gist.c.
References ARRPTR, crc, crc32_sz(), DatumGetPointer(), deconstruct_array_builtin(), elog, ERROR, fb(), GET_SIGLEN, GETBIT, GETSIGN, HASHVAL, HS_COUNT, HSTORE_KEY, HSTORE_KEYLEN, HSTORE_VAL, HSTORE_VALISNULL, HSTORE_VALLEN, HStoreContainsStrategyNumber, HStoreExistsAllStrategyNumber, HStoreExistsAnyStrategyNumber, HStoreExistsStrategyNumber, HStoreOldContainsStrategyNumber, i, ISALLTRUE, PG_GETARG_ARRAYTYPE_P, PG_GETARG_HSTORE_P, PG_GETARG_OID, PG_GETARG_POINTER, PG_GETARG_TEXT_PP, PG_GETARG_UINT16, PG_RETURN_BOOL, sign, STRPTR, VARDATA(), VARDATA_ANY(), VARHDRSZ, VARSIZE(), and VARSIZE_ANY_EXHDR().
| Datum ghstore_decompress | ( | PG_FUNCTION_ARGS | ) |
Definition at line 213 of file hstore_gist.c.
References PG_GETARG_POINTER, and PG_RETURN_POINTER.
| Datum ghstore_in | ( | PG_FUNCTION_ARGS | ) |
Definition at line 98 of file hstore_gist.c.
References ereport, errcode(), errmsg(), ERROR, fb(), and PG_RETURN_VOID.
| Datum ghstore_options | ( | PG_FUNCTION_ARGS | ) |
Definition at line 615 of file hstore_gist.c.
References add_local_int_reloption(), fb(), init_local_reloptions(), PG_GETARG_POINTER, PG_RETURN_VOID, SIGLEN_DEFAULT, and SIGLEN_MAX.
| Datum ghstore_out | ( | PG_FUNCTION_ARGS | ) |
Definition at line 108 of file hstore_gist.c.
References ereport, errcode(), errmsg(), ERROR, fb(), and PG_RETURN_VOID.
| Datum ghstore_penalty | ( | PG_FUNCTION_ARGS | ) |
Definition at line 337 of file hstore_gist.c.
References DatumGetPointer(), fb(), GET_SIGLEN, hemdist(), newval, PG_GETARG_POINTER, and PG_RETURN_POINTER.
| Datum ghstore_picksplit | ( | PG_FUNCTION_ARGS | ) |
Definition at line 366 of file hstore_gist.c.
References comparecost(), fb(), FirstOffsetNumber, GET_SIGLEN, GETENTRY, GETSIGN, ghstore_alloc(), hemdist(), i, ISALLTRUE, j, LOOPBYTE, GistEntryVector::n, OffsetNumberNext, palloc(), palloc_array, PG_GETARG_POINTER, PG_RETURN_POINTER, PointerGetDatum(), qsort, GIST_SPLITVEC::spl_ldatum, GIST_SPLITVEC::spl_left, GIST_SPLITVEC::spl_nleft, GIST_SPLITVEC::spl_nright, GIST_SPLITVEC::spl_rdatum, GIST_SPLITVEC::spl_right, and WISH_F.
| Datum ghstore_same | ( | PG_FUNCTION_ARGS | ) |
Definition at line 219 of file hstore_gist.c.
References a, b, fb(), GET_SIGLEN, GETSIGN, i, ISALLTRUE, LOOPBYTE, PG_GETARG_POINTER, and PG_RETURN_POINTER.
| Datum ghstore_union | ( | PG_FUNCTION_ARGS | ) |
Definition at line 310 of file hstore_gist.c.
References ALLISTRUE, CALCGTSIZE, fb(), GISTTYPE::flag, GET_SIGLEN, GETENTRY, GETSIGN, ghstore_alloc(), i, len, GistEntryVector::n, PG_GETARG_POINTER, PG_RETURN_POINTER, SET_VARSIZE(), unionkey(), and VARSIZE().
Definition at line 281 of file hstore_gist.c.
References a, b, GETSIGN, hemdistsign(), ISALLTRUE, SIGLENBIT, and sizebitvec().
Referenced by ghstore_penalty(), and ghstore_picksplit().
| PG_FUNCTION_INFO_V1 | ( | ghstore_compress | ) |
| PG_FUNCTION_INFO_V1 | ( | ghstore_consistent | ) |
| PG_FUNCTION_INFO_V1 | ( | ghstore_decompress | ) |
| PG_FUNCTION_INFO_V1 | ( | ghstore_in | ) |
| PG_FUNCTION_INFO_V1 | ( | ghstore_options | ) |
| PG_FUNCTION_INFO_V1 | ( | ghstore_out | ) |
| PG_FUNCTION_INFO_V1 | ( | ghstore_penalty | ) |
| PG_FUNCTION_INFO_V1 | ( | ghstore_picksplit | ) |
| PG_FUNCTION_INFO_V1 | ( | ghstore_same | ) |
| PG_FUNCTION_INFO_V1 | ( | ghstore_union | ) |