/* *Argumentstructsforspg_configmethod
*/ typedefstruct spgConfigIn
{
Oid attType; /* Data type to be indexed */
} spgConfigIn;
typedefstruct spgConfigOut
{
Oid prefixType; /* Data type of inner-tuple prefixes */
Oid labelType; /* Data type of inner-tuple node labels */
Oid leafType; /* Data type of leaf-tuple values */ bool canReturnData; /* Opclass can reconstruct original data */ bool longValuesOK; /* Opclass can cope with values > 1 page */
} spgConfigOut;
/* *Argumentstructsforspg_choosemethod
*/ typedefstruct spgChooseIn
{
Datum datum; /* original datum to be indexed */
Datum leafDatum; /* current datum to be stored at leaf */ int level; /* current level (counting from zero) */
/* Data from current inner tuple */ bool allTheSame; /* tuple is marked all-the-same? */ bool hasPrefix; /* tuple has a prefix? */
Datum prefixDatum; /* if so, the prefix value */ int nNodes; /* number of nodes in the inner tuple */
Datum *nodeLabels; /* node label values (NULL if none) */
} spgChooseIn;
typedefenum spgChooseResultType
{
spgMatchNode = 1, /* descend into existing node */
spgAddNode, /* add a node to the inner tuple */
spgSplitTuple, /* split inner tuple (change its prefix) */
} spgChooseResultType;
typedefstruct spgChooseOut
{
spgChooseResultType resultType; /* action code, see above */ union
{ struct/* results for spgMatchNode */
{ int nodeN; /* descend to this node (index from 0) */ int levelAdd; /* increment level by this much */
Datum restDatum; /* new leaf datum */
} matchNode; struct/* results for spgAddNode */
{
Datum nodeLabel; /* new node's label */ int nodeN; /* where to insert it (index from 0) */
} addNode; struct/* results for spgSplitTuple */
{ /* Info to form new upper-level inner tuple with one child tuple */ bool prefixHasPrefix; /* tuple should have a prefix? */
Datum prefixPrefixDatum; /* if so, its value */ int prefixNNodes; /* number of nodes */
Datum *prefixNodeLabels; /* their labels (or NULL for no
* labels) */ int childNodeN; /* which node gets child tuple */
/* Info to form new lower-level inner tuple with all old nodes */ bool postfixHasPrefix; /* tuple should have a prefix? */
Datum postfixPrefixDatum; /* if so, its value */
} splitTuple;
} result;
} spgChooseOut;
/* *Argumentstructsforspg_picksplitmethod
*/ typedefstruct spgPickSplitIn
{ int nTuples; /* number of leaf tuples */
Datum *datums; /* their datums (array of length nTuples) */ int level; /* current level (counting from zero) */
} spgPickSplitIn;
typedefstruct spgPickSplitOut
{ bool hasPrefix; /* new inner tuple should have a prefix? */
Datum prefixDatum; /* if so, its value */
int nNodes; /* number of nodes for new inner tuple */
Datum *nodeLabels; /* their labels (or NULL for no labels) */
int *mapTuplesToNodes; /* node index for each leaf tuple */
Datum *leafTupleDatums; /* datum to store in each new leaf tuple */
} spgPickSplitOut;
/* *Argumentstructsforspg_inner_consistentmethod
*/ typedefstruct spgInnerConsistentIn
{
ScanKey scankeys; /* array of operators and comparison values */
ScanKey orderbys; /* array of ordering operators and comparison
* values */ int nkeys; /* length of scankeys array */ int norderbys; /* length of orderbys array */
Datum reconstructedValue; /* value reconstructed at parent */ void *traversalValue; /* opclass-specific traverse value */
MemoryContext traversalMemoryContext; /* put new traverse values here */ int level; /* current level (counting from zero) */ bool returnData; /* original data must be returned? */
/* Data from current inner tuple */ bool allTheSame; /* tuple is marked all-the-same? */ bool hasPrefix; /* tuple has a prefix? */
Datum prefixDatum; /* if so, the prefix value */ int nNodes; /* number of nodes in the inner tuple */
Datum *nodeLabels; /* node label values (NULL if none) */
} spgInnerConsistentIn;
typedefstruct spgInnerConsistentOut
{ int nNodes; /* number of child nodes to be visited */ int *nodeNumbers; /* their indexes in the node array */ int *levelAdds; /* increment level by this much for each */
Datum *reconstructedValues; /* associated reconstructed values */ void **traversalValues; /* opclass-specific traverse values */ double **distances; /* associated distances */
} spgInnerConsistentOut;
/* *Argumentstructsforspg_leaf_consistentmethod
*/ typedefstruct spgLeafConsistentIn
{
ScanKey scankeys; /* array of operators and comparison values */
ScanKey orderbys; /* array of ordering operators and comparison
* values */ int nkeys; /* length of scankeys array */ int norderbys; /* length of orderbys array */
Datum reconstructedValue; /* value reconstructed at parent */ void *traversalValue; /* opclass-specific traverse value */ int level; /* current level (counting from zero) */ bool returnData; /* original data must be returned? */
Datum leafDatum; /* datum in leaf tuple */
} spgLeafConsistentIn;
typedefstruct spgLeafConsistentOut
{
Datum leafValue; /* reconstructed original data, if any */ bool recheck; /* set true if operator must be rechecked */ bool recheckDistances; /* set true if distances must be rechecked */ double *distances; /* associated distances */
} spgLeafConsistentOut;
/* spgvalidate.c */ externbool spgvalidate(Oid opclassoid); externvoid spgadjustmembers(Oid opfamilyoid,
Oid opclassoid,
List *operators,
List *functions);
#endif/* SPGIST_H */
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.16Bemerkung:
(vorverarbeitet am 2026-08-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.