PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/spgist.h"
#include "catalog/pg_type.h"
#include "utils/datum.h"
#include "varatt.h"
Go to the source code of this file.
Functions | |
PG_FUNCTION_INFO_V1 (spgist_name_config) | |
Datum | spgist_name_config (PG_FUNCTION_ARGS) |
static Datum | formTextDatum (const char *data, int datalen) |
static int | commonPrefix (const char *a, const char *b, int lena, int lenb) |
static bool | searchChar (Datum *nodeLabels, int nNodes, int16 c, int *i) |
PG_FUNCTION_INFO_V1 (spgist_name_choose) | |
Datum | spgist_name_choose (PG_FUNCTION_ARGS) |
PG_FUNCTION_INFO_V1 (spgist_name_inner_consistent) | |
Datum | spgist_name_inner_consistent (PG_FUNCTION_ARGS) |
PG_FUNCTION_INFO_V1 (spgist_name_leaf_consistent) | |
Datum | spgist_name_leaf_consistent (PG_FUNCTION_ARGS) |
PG_FUNCTION_INFO_V1 (spgist_name_compress) | |
Datum | spgist_name_compress (PG_FUNCTION_ARGS) |
Variables | |
PG_MODULE_MAGIC | |
|
static |
|
static |
Definition at line 52 of file spgist_name_ops.c.
References data, palloc(), PointerGetDatum(), SET_VARSIZE, SET_VARSIZE_SHORT, VARATT_SHORT_MAX, VARHDRSZ, and VARHDRSZ_SHORT.
Referenced by spgist_name_choose(), and spgist_name_compress().
PG_FUNCTION_INFO_V1 | ( | spgist_name_choose | ) |
PG_FUNCTION_INFO_V1 | ( | spgist_name_compress | ) |
PG_FUNCTION_INFO_V1 | ( | spgist_name_config | ) |
PG_FUNCTION_INFO_V1 | ( | spgist_name_inner_consistent | ) |
PG_FUNCTION_INFO_V1 | ( | spgist_name_leaf_consistent | ) |
Definition at line 97 of file spgist_name_ops.c.
References DatumGetInt16(), and i.
Referenced by spgist_name_choose().
Datum spgist_name_choose | ( | PG_FUNCTION_ARGS | ) |
Definition at line 124 of file spgist_name_ops.c.
References spgChooseOut::addNode, spgChooseIn::allTheSame, commonPrefix(), spgChooseIn::datum, DatumGetName(), DatumGetTextPP, formTextDatum(), spgChooseIn::hasPrefix, i, Int16GetDatum(), spgChooseIn::level, spgChooseOut::matchNode, NameStr, spgChooseIn::nNodes, spgChooseIn::nodeLabels, palloc(), PG_GETARG_POINTER, PG_RETURN_VOID, spgChooseIn::prefixDatum, spgChooseOut::result, spgChooseOut::resultType, searchChar(), spgAddNode, spgMatchNode, spgSplitTuple, spgChooseOut::splitTuple, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Datum spgist_name_compress | ( | PG_FUNCTION_ARGS | ) |
Definition at line 496 of file spgist_name_ops.c.
References formTextDatum(), NameStr, PG_GETARG_NAME, and PG_RETURN_DATUM.
Datum spgist_name_config | ( | PG_FUNCTION_ARGS | ) |
Definition at line 34 of file spgist_name_ops.c.
References spgConfigOut::canReturnData, spgConfigOut::labelType, spgConfigOut::leafType, spgConfigOut::longValuesOK, PG_GETARG_POINTER, PG_RETURN_VOID, and spgConfigOut::prefixType.
Datum spgist_name_inner_consistent | ( | PG_FUNCTION_ARGS | ) |
Definition at line 266 of file spgist_name_ops.c.
References Assert, BTEqualStrategyNumber, BTGreaterEqualStrategyNumber, BTGreaterStrategyNumber, BTLessEqualStrategyNumber, BTLessStrategyNumber, datumCopy(), DatumGetInt16(), DatumGetName(), DatumGetPointer(), DatumGetTextPP, elog, ERROR, spgInnerConsistentIn::hasPrefix, i, j, spgInnerConsistentIn::level, spgInnerConsistentOut::levelAdds, Min, NameStr, spgInnerConsistentIn::nkeys, spgInnerConsistentIn::nNodes, spgInnerConsistentOut::nNodes, spgInnerConsistentIn::nodeLabels, spgInnerConsistentOut::nodeNumbers, palloc(), PG_GETARG_POINTER, PG_RETURN_VOID, PointerGetDatum(), spgInnerConsistentIn::prefixDatum, spgInnerConsistentIn::reconstructedValue, spgInnerConsistentOut::reconstructedValues, res, spgInnerConsistentIn::scankeys, SET_VARSIZE, ScanKeyData::sk_argument, ScanKeyData::sk_strategy, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Datum spgist_name_leaf_consistent | ( | PG_FUNCTION_ARGS | ) |
Definition at line 399 of file spgist_name_ops.c.
References Assert, BTEqualStrategyNumber, BTGreaterEqualStrategyNumber, BTGreaterStrategyNumber, BTLessEqualStrategyNumber, BTLessStrategyNumber, DatumGetName(), DatumGetPointer(), DatumGetTextPP, elog, ERROR, j, spgLeafConsistentIn::leafDatum, spgLeafConsistentOut::leafValue, spgLeafConsistentIn::level, Min, NAMEDATALEN, NameStr, spgLeafConsistentIn::nkeys, palloc0(), PG_GETARG_POINTER, PG_RETURN_BOOL, PointerGetDatum(), spgLeafConsistentOut::recheck, spgLeafConsistentIn::reconstructedValue, res, spgLeafConsistentIn::scankeys, ScanKeyData::sk_argument, ScanKeyData::sk_strategy, VARDATA, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
PG_MODULE_MAGIC |
Definition at line 29 of file spgist_name_ops.c.