PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <sys/socket.h>
#include "access/spgist.h"
#include "catalog/pg_type.h"
#include "utils/fmgrprotos.h"
#include "utils/inet.h"
#include "varatt.h"
Go to the source code of this file.
Functions | |
static int | inet_spg_node_number (const inet *val, int commonbits) |
static int | inet_spg_consistent_bitmap (const inet *prefix, int nkeys, ScanKey scankeys, bool leaf) |
Datum | inet_spg_config (PG_FUNCTION_ARGS) |
Datum | inet_spg_choose (PG_FUNCTION_ARGS) |
Datum | inet_spg_picksplit (PG_FUNCTION_ARGS) |
Datum | inet_spg_inner_consistent (PG_FUNCTION_ARGS) |
Datum | inet_spg_leaf_consistent (PG_FUNCTION_ARGS) |
Datum inet_spg_choose | ( | PG_FUNCTION_ARGS | ) |
Definition at line 68 of file network_spgist.c.
References spgChooseIn::allTheSame, Assert, bitncmp(), bitncommon(), cidr_set_masklen_internal(), spgChooseIn::datum, DatumGetInetPP(), spgChooseIn::hasPrefix, inet_spg_node_number(), InetPGetDatum(), ip_addr, ip_bits, ip_family, spgChooseOut::matchNode, Min, spgChooseIn::nNodes, PG_GETARG_POINTER, PG_RETURN_VOID, PGSQL_AF_INET, spgChooseIn::prefixDatum, spgChooseOut::result, spgChooseOut::resultType, spgMatchNode, spgSplitTuple, spgChooseOut::splitTuple, and val.
Datum inet_spg_config | ( | PG_FUNCTION_ARGS | ) |
Definition at line 51 of file network_spgist.c.
References spgConfigOut::canReturnData, spgConfigOut::labelType, spgConfigOut::longValuesOK, PG_GETARG_POINTER, PG_RETURN_VOID, and spgConfigOut::prefixType.
|
static |
Definition at line 374 of file network_spgist.c.
References bitncmp(), DatumGetInetPP(), i, ip_addr, ip_bits, ip_family, ip_maxbits, Min, RTEqualStrategyNumber, RTGreaterEqualStrategyNumber, RTGreaterStrategyNumber, RTLessEqualStrategyNumber, RTLessStrategyNumber, RTNotEqualStrategyNumber, RTSubEqualStrategyNumber, RTSubStrategyNumber, RTSuperEqualStrategyNumber, RTSuperStrategyNumber, and ScanKeyData::sk_strategy.
Referenced by inet_spg_inner_consistent(), and inet_spg_leaf_consistent().
Datum inet_spg_inner_consistent | ( | PG_FUNCTION_ARGS | ) |
Definition at line 239 of file network_spgist.c.
References spgInnerConsistentIn::allTheSame, Assert, DatumGetInetPP(), spgInnerConsistentIn::hasPrefix, i, inet_spg_consistent_bitmap(), ip_family, spgInnerConsistentIn::nkeys, spgInnerConsistentIn::nNodes, spgInnerConsistentOut::nNodes, spgInnerConsistentOut::nodeNumbers, palloc(), PG_GETARG_POINTER, PG_RETURN_VOID, PGSQL_AF_INET, PGSQL_AF_INET6, spgInnerConsistentIn::prefixDatum, RTGreaterEqualStrategyNumber, RTGreaterStrategyNumber, RTLessEqualStrategyNumber, RTLessStrategyNumber, RTNotEqualStrategyNumber, spgInnerConsistentIn::scankeys, ScanKeyData::sk_argument, and ScanKeyData::sk_strategy.
Datum inet_spg_leaf_consistent | ( | PG_FUNCTION_ARGS | ) |
Definition at line 323 of file network_spgist.c.
References DatumGetInetPP(), inet_spg_consistent_bitmap(), InetPGetDatum(), spgLeafConsistentIn::leafDatum, spgLeafConsistentOut::leafValue, spgLeafConsistentIn::nkeys, PG_GETARG_POINTER, PG_RETURN_BOOL, spgLeafConsistentOut::recheck, and spgLeafConsistentIn::scankeys.
|
static |
Definition at line 350 of file network_spgist.c.
References ip_addr, ip_bits, ip_maxbits, and val.
Referenced by inet_spg_choose(), and inet_spg_picksplit().
Datum inet_spg_picksplit | ( | PG_FUNCTION_ARGS | ) |
Definition at line 165 of file network_spgist.c.
References bitncommon(), cidr_set_masklen_internal(), DatumGetInetPP(), spgPickSplitIn::datums, spgPickSplitOut::hasPrefix, i, inet_spg_node_number(), InetPGetDatum(), ip_addr, ip_bits, ip_family, spgPickSplitOut::leafTupleDatums, spgPickSplitOut::mapTuplesToNodes, spgPickSplitOut::nNodes, spgPickSplitOut::nodeLabels, spgPickSplitIn::nTuples, palloc(), PG_GETARG_POINTER, PG_RETURN_VOID, PGSQL_AF_INET, and spgPickSplitOut::prefixDatum.