#include "access/attnum.h"
#include "fmgr.h"
Go to the source code of this file.
Data Structures | |
struct | ScanKeyData |
Defines | |
#define | InvalidStrategy ((StrategyNumber) 0) |
#define | BTLessStrategyNumber 1 |
#define | BTLessEqualStrategyNumber 2 |
#define | BTEqualStrategyNumber 3 |
#define | BTGreaterEqualStrategyNumber 4 |
#define | BTGreaterStrategyNumber 5 |
#define | BTMaxStrategyNumber 5 |
#define | SK_ISNULL 0x0001 |
#define | SK_UNARY 0x0002 |
#define | SK_ROW_HEADER 0x0004 |
#define | SK_ROW_MEMBER 0x0008 |
#define | SK_ROW_END 0x0010 |
#define | SK_SEARCHARRAY 0x0020 |
#define | SK_SEARCHNULL 0x0040 |
#define | SK_SEARCHNOTNULL 0x0080 |
#define | SK_ORDER_BY 0x0100 |
Typedefs | |
typedef uint16 | StrategyNumber |
typedef struct ScanKeyData | ScanKeyData |
typedef ScanKeyData * | ScanKey |
Functions | |
void | ScanKeyInit (ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument) |
void | ScanKeyEntryInitialize (ScanKey entry, int flags, AttrNumber attributeNumber, StrategyNumber strategy, Oid subtype, Oid collation, RegProcedure procedure, Datum argument) |
void | ScanKeyEntryInitializeWithInfo (ScanKey entry, int flags, AttrNumber attributeNumber, StrategyNumber strategy, Oid subtype, Oid collation, FmgrInfo *finfo, Datum argument) |
#define BTEqualStrategyNumber 3 |
Definition at line 36 of file skey.h.
Referenced by _bt_compare_scankey_args(), _bt_first(), _bt_mark_scankey_required(), _bt_preprocess_array_keys(), _bt_preprocess_keys(), AfterTriggerSetState(), AlterConstraintNamespaces(), AlterDatabase(), AlterDatabaseOwner(), AlterDomainDropConstraint(), AlterDomainValidateConstraint(), AlterExtensionNamespace(), AlterSeqNamespaces(), AlterSetting(), AlterTableSpaceOptions(), ApplyExtensionUpdates(), ApplySetting(), ATExecAddInherit(), ATExecAddOf(), ATExecAlterColumnType(), ATExecDropConstraint(), ATExecDropInherit(), ATExecValidateConstraint(), AttrDefaultFetch(), btcostestimate(), change_owner_fix_column_acls(), change_owner_recurse_to_sequences(), changeDependencyFor(), check_functional_grouping(), CheckConstraintFetch(), checkSharedDependencies(), ChooseConstraintName(), ConstraintNameIsUsed(), copyTemplateDependencies(), CreateComments(), CreateSharedComments(), CreateTrigger(), DefineOpClass(), DefineTSConfiguration(), DeleteAttributeTuples(), DeleteComments(), deleteDependencyRecordsFor(), deleteDependencyRecordsForClass(), deleteOneObject(), DeleteSecurityLabel(), DeleteSharedComments(), DeleteSharedSecurityLabel(), DeleteSystemAttributeTuples(), do_autovacuum(), drop_parent_dependency(), DropCastById(), DropConfigurationMapping(), dropDatabaseDependencies(), DropRole(), DropSetting(), DropTableSpace(), EnableDisableTrigger(), enum_endpoint(), enum_range_internal(), EnumValuesDelete(), ExecAlterExtensionStmt(), ExecGrant_Largeobject(), extension_config_remove(), find_composite_type_dependencies(), find_inheritance_children(), find_language_template(), find_typed_table_dependencies(), findDependentObjects(), gbt_num_consistent(), gbt_var_consistent(), get_btree_test_op(), get_catalog_object_by_oid(), get_constraint_index(), get_database_oid(), get_db_info(), get_domain_constraint_oid(), get_equality_op_for_ordering_op(), get_extension_name(), get_extension_oid(), get_extension_schema(), get_index_constraint(), get_mergejoin_opfamilies(), get_op_btree_interpretation(), get_ordering_op_for_equality_op(), get_pkey_attnames(), get_relation_constraint_oid(), get_rels_with_domain(), get_rewrite_oid_without_relid(), get_tables_to_cluster(), get_tablespace_name(), get_tablespace_oid(), get_trigger_oid(), GetComment(), GetDatabaseTuple(), GetDatabaseTupleByOid(), GetDefaultOpClass(), GetDomainConstraints(), getExtensionOfObject(), GetNewOidWithIndex(), getObjectDescription(), getObjectIdentity(), getOwnedSequences(), getRelationsInNamespace(), GetSecurityLabel(), GetSharedSecurityLabel(), index_update_stats(), inv_getsize(), inv_read(), inv_truncate(), inv_write(), isObjectPinned(), isSharedObjectPinned(), LargeObjectDrop(), LargeObjectExists(), load_enum_cache_data(), lookup_ts_config_cache(), lookup_type_cache(), LookupOpclassInfo(), ltree_consistent(), make_pathkey_from_sortinfo(), makeConfigurationDependencies(), MakeConfigurationMapping(), MergeConstraintsIntoExisting(), mergejoinscansel(), MergeWithExistingConstraint(), MJExamineQuals(), movedb(), myLargeObjectExists(), objectsInSchemaToOids(), patternsel(), pg_extension_config_dump(), pg_extension_ownercheck(), pg_get_serial_sequence(), pg_get_triggerdef_worker(), pg_largeobject_aclmask_snapshot(), pg_largeobject_ownercheck(), prefix_quals(), prefix_selectivity(), RangeDelete(), regclassin(), regoperin(), regprocin(), regtypein(), RelationBuildRuleLock(), RelationBuildTriggers(), RelationBuildTupleDesc(), RelationGetExclusionInfo(), RelationGetIndexList(), RelationRemoveInheritance(), RemoveAmOpEntryById(), RemoveAmProcEntryById(), RemoveAttrDefault(), RemoveAttrDefaultById(), RemoveCollationById(), RemoveConversionById(), RemoveDefaultACLById(), RemoveExtensionById(), RemoveRewriteRuleById(), RemoveRoleFromObjectACL(), RemoveStatistics(), RemoveTriggerById(), RemoveTSConfigurationById(), RenameTableSpace(), renametrig(), ScanPgRelation(), select_equality_operator(), sepgsql_attribute_post_create(), sepgsql_database_post_create(), sepgsql_proc_post_create(), sepgsql_proc_setattr(), sepgsql_relation_post_create(), sepgsql_relation_setattr(), sepgsql_relation_setattr_extra(), sepgsql_schema_post_create(), sequenceIsOwned(), SetSecurityLabel(), SetSharedSecurityLabel(), shdepChangeDep(), shdepDropDependency(), shdepDropOwned(), shdepReassignOwned(), spg_text_inner_consistent(), spg_text_leaf_consistent(), toast_delete_datum(), toast_fetch_datum(), toast_fetch_datum_slice(), toastrel_valueid_exists(), and typeInheritsFrom().
#define BTGreaterEqualStrategyNumber 4 |
Definition at line 37 of file skey.h.
Referenced by _bt_check_rowcompare(), _bt_compare_scankey_args(), _bt_first(), _bt_mark_scankey_required(), _bt_preprocess_array_keys(), _bt_preprocess_keys(), adjust_rowcompare_for_index(), gbt_num_consistent(), gbt_var_consistent(), inv_read(), inv_truncate(), inv_write(), ltree_consistent(), match_rowcompare_to_indexcol(), mergejoinscansel(), network_prefix_quals(), prefix_quals(), prefix_selectivity(), spg_text_inner_consistent(), spg_text_leaf_consistent(), and toast_fetch_datum_slice().
#define BTGreaterStrategyNumber 5 |
Definition at line 38 of file skey.h.
Referenced by _bt_check_rowcompare(), _bt_compare_scankey_args(), _bt_first(), _bt_mark_scankey_required(), _bt_preprocess_array_keys(), _bt_preprocess_keys(), adjust_rowcompare_for_index(), gbt_num_consistent(), gbt_var_consistent(), get_actual_variable_range(), get_ordering_op_properties(), lookup_type_cache(), ltree_consistent(), make_pathkey_from_sortinfo(), make_pathkey_from_sortop(), match_rowcompare_to_indexcol(), mergejoinscansel(), MJExamineQuals(), network_prefix_quals(), RelationBuildTupleDesc(), spg_text_inner_consistent(), and spg_text_leaf_consistent().
#define BTLessEqualStrategyNumber 2 |
Definition at line 35 of file skey.h.
Referenced by _bt_check_rowcompare(), _bt_compare_scankey_args(), _bt_first(), _bt_mark_scankey_required(), _bt_preprocess_array_keys(), _bt_preprocess_keys(), adjust_rowcompare_for_index(), DeleteSystemAttributeTuples(), gbt_num_consistent(), gbt_var_consistent(), ltree_consistent(), match_rowcompare_to_indexcol(), mergejoinscansel(), network_prefix_quals(), spg_text_inner_consistent(), spg_text_leaf_consistent(), and toast_fetch_datum_slice().
#define BTLessStrategyNumber 1 |
Definition at line 34 of file skey.h.
Referenced by _bt_check_rowcompare(), _bt_compare_scankey_args(), _bt_first(), _bt_mark_scankey_required(), _bt_preprocess_array_keys(), _bt_preprocess_keys(), adjust_rowcompare_for_index(), btcostestimate(), gbt_num_consistent(), gbt_var_consistent(), get_actual_variable_range(), get_ordering_op_for_equality_op(), get_ordering_op_properties(), get_relation_info(), lookup_type_cache(), ltree_consistent(), match_pathkeys_to_index(), match_rowcompare_to_indexcol(), mergejoinscansel(), MJExamineQuals(), prefix_quals(), prefix_selectivity(), right_merge_direction(), select_outer_pathkeys_for_merge(), spg_text_inner_consistent(), and spg_text_leaf_consistent().
#define BTMaxStrategyNumber 5 |
Definition at line 40 of file skey.h.
Referenced by _bt_preprocess_keys().
#define InvalidStrategy ((StrategyNumber) 0) |
Definition at line 28 of file skey.h.
Referenced by _bt_first(), _bt_mkscankey(), _bt_mkscankey_nodata(), ExecIndexBuildScanKeys(), get_actual_variable_range(), ginNewScanKey(), and RelationGetExclusionInfo().
#define SK_ISNULL 0x0001 |
Definition at line 136 of file skey.h.
Referenced by _bt_check_rowcompare(), _bt_checkkeys(), _bt_compare(), _bt_compare_scankey_args(), _bt_first(), _bt_fix_scankey_strategy(), _bt_isequal(), _bt_mkscankey(), _bt_mkscankey_nodata(), _bt_preprocess_array_keys(), _hash_checkqual(), _hash_first(), ExecIndexBuildScanKeys(), get_actual_variable_range(), ginNewScanKey(), gistindex_keytest(), gistrescan(), and spgPrepareScanKeys().
#define SK_ROW_END 0x0010 |
Definition at line 140 of file skey.h.
Referenced by _bt_check_rowcompare(), _bt_first(), _bt_fix_scankey_strategy(), and _bt_mark_scankey_required().
#define SK_ROW_HEADER 0x0004 |
Definition at line 138 of file skey.h.
Referenced by _bt_checkkeys(), _bt_first(), _bt_fix_scankey_strategy(), _bt_mark_scankey_required(), _bt_preprocess_array_keys(), and _bt_preprocess_keys().
#define SK_ROW_MEMBER 0x0008 |
Definition at line 139 of file skey.h.
Referenced by _bt_check_rowcompare(), _bt_first(), _bt_fix_scankey_strategy(), and _bt_mark_scankey_required().
#define SK_SEARCHARRAY 0x0020 |
Definition at line 141 of file skey.h.
Referenced by _bt_preprocess_array_keys().
#define SK_SEARCHNOTNULL 0x0080 |
Definition at line 143 of file skey.h.
Referenced by _bt_checkkeys(), _bt_compare_scankey_args(), _bt_first(), _bt_fix_scankey_strategy(), _bt_preprocess_array_keys(), get_actual_variable_range(), gistindex_keytest(), gistrescan(), ScanKeyEntryInitialize(), and spgPrepareScanKeys().
#define SK_SEARCHNULL 0x0040 |
Definition at line 142 of file skey.h.
Referenced by _bt_checkkeys(), _bt_compare_scankey_args(), _bt_fix_scankey_strategy(), _bt_preprocess_array_keys(), _bt_preprocess_keys(), gistindex_keytest(), gistrescan(), ScanKeyEntryInitialize(), and spgPrepareScanKeys().
typedef ScanKeyData* ScanKey |
typedef struct ScanKeyData ScanKeyData |
typedef uint16 StrategyNumber |
void ScanKeyEntryInitialize | ( | ScanKey | entry, | |
int | flags, | |||
AttrNumber | attributeNumber, | |||
StrategyNumber | strategy, | |||
Oid | subtype, | |||
Oid | collation, | |||
RegProcedure | procedure, | |||
Datum | argument | |||
) |
Definition at line 32 of file scankey.c.
References Assert, fmgr_info(), MemSet, RegProcedureIsValid, ScanKeyData::sk_argument, ScanKeyData::sk_attno, ScanKeyData::sk_collation, ScanKeyData::sk_flags, ScanKeyData::sk_func, SK_SEARCHNOTNULL, SK_SEARCHNULL, ScanKeyData::sk_strategy, and ScanKeyData::sk_subtype.
Referenced by _bt_first(), check_exclusion_constraint(), ExecIndexBuildScanKeys(), and get_actual_variable_range().
{ entry->sk_flags = flags; entry->sk_attno = attributeNumber; entry->sk_strategy = strategy; entry->sk_subtype = subtype; entry->sk_collation = collation; entry->sk_argument = argument; if (RegProcedureIsValid(procedure)) { fmgr_info(procedure, &entry->sk_func); } else { Assert(flags & (SK_SEARCHNULL | SK_SEARCHNOTNULL)); MemSet(&entry->sk_func, 0, sizeof(entry->sk_func)); } }
void ScanKeyEntryInitializeWithInfo | ( | ScanKey | entry, | |
int | flags, | |||
AttrNumber | attributeNumber, | |||
StrategyNumber | strategy, | |||
Oid | subtype, | |||
Oid | collation, | |||
FmgrInfo * | finfo, | |||
Datum | argument | |||
) |
Definition at line 101 of file scankey.c.
References CurrentMemoryContext, fmgr_info_copy(), ScanKeyData::sk_argument, ScanKeyData::sk_attno, ScanKeyData::sk_collation, ScanKeyData::sk_flags, ScanKeyData::sk_func, ScanKeyData::sk_strategy, and ScanKeyData::sk_subtype.
Referenced by _bt_first(), _bt_mkscankey(), and _bt_mkscankey_nodata().
{ entry->sk_flags = flags; entry->sk_attno = attributeNumber; entry->sk_strategy = strategy; entry->sk_subtype = subtype; entry->sk_collation = collation; entry->sk_argument = argument; fmgr_info_copy(&entry->sk_func, finfo, CurrentMemoryContext); }
void ScanKeyInit | ( | ScanKey | entry, | |
AttrNumber | attributeNumber, | |||
StrategyNumber | strategy, | |||
RegProcedure | procedure, | |||
Datum | argument | |||
) |
Definition at line 76 of file scankey.c.
References fmgr_info(), ScanKeyData::sk_argument, ScanKeyData::sk_attno, ScanKeyData::sk_collation, ScanKeyData::sk_flags, ScanKeyData::sk_func, ScanKeyData::sk_strategy, and ScanKeyData::sk_subtype.
Referenced by AfterTriggerSetState(), AlterConstraintNamespaces(), AlterDatabase(), AlterDatabaseOwner(), AlterDomainDropConstraint(), AlterDomainValidateConstraint(), AlterExtensionNamespace(), AlterSeqNamespaces(), AlterSetting(), AlterTableSpaceOptions(), ApplyExtensionUpdates(), ApplySetting(), ATExecAddInherit(), ATExecAddOf(), ATExecAlterColumnType(), ATExecDropConstraint(), ATExecDropInherit(), ATExecValidateConstraint(), AttrDefaultFetch(), change_owner_fix_column_acls(), change_owner_recurse_to_sequences(), changeDependencyFor(), check_functional_grouping(), CheckConstraintFetch(), checkSharedDependencies(), ChooseConstraintName(), ConstraintNameIsUsed(), copyTemplateDependencies(), CreateComments(), CreateSharedComments(), CreateTrigger(), DefineOpClass(), DefineTSConfiguration(), DeleteAttributeTuples(), DeleteComments(), deleteDependencyRecordsFor(), deleteDependencyRecordsForClass(), deleteOneObject(), DeleteSecurityLabel(), DeleteSharedComments(), DeleteSharedSecurityLabel(), DeleteSystemAttributeTuples(), do_autovacuum(), drop_parent_dependency(), DropCastById(), DropConfigurationMapping(), dropDatabaseDependencies(), DropRole(), DropSetting(), DropTableSpace(), EnableDisableTrigger(), enum_endpoint(), enum_range_internal(), EnumValuesDelete(), ExecAlterExtensionStmt(), ExecGrant_Largeobject(), extension_config_remove(), find_composite_type_dependencies(), find_inheritance_children(), find_language_template(), find_typed_table_dependencies(), findDependentObjects(), get_catalog_object_by_oid(), get_constraint_index(), get_database_oid(), get_db_info(), get_domain_constraint_oid(), get_extension_name(), get_extension_oid(), get_extension_schema(), get_index_constraint(), get_pkey_attnames(), get_relation_constraint_oid(), get_rels_with_domain(), get_rewrite_oid_without_relid(), get_tables_to_cluster(), get_tablespace_name(), get_tablespace_oid(), get_trigger_oid(), GetComment(), GetDatabaseTuple(), GetDatabaseTupleByOid(), GetDefaultOpClass(), GetDomainConstraints(), getExtensionOfObject(), GetNewOidWithIndex(), getObjectDescription(), getObjectIdentity(), getOwnedSequences(), getRelationsInNamespace(), GetSecurityLabel(), GetSharedSecurityLabel(), index_update_stats(), inv_getsize(), inv_read(), inv_truncate(), inv_write(), isObjectPinned(), isSharedObjectPinned(), LargeObjectDrop(), LargeObjectExists(), load_enum_cache_data(), lookup_ts_config_cache(), LookupOpclassInfo(), makeConfigurationDependencies(), MakeConfigurationMapping(), MergeConstraintsIntoExisting(), MergeWithExistingConstraint(), movedb(), myLargeObjectExists(), objectsInSchemaToOids(), pg_extension_config_dump(), pg_extension_ownercheck(), pg_get_serial_sequence(), pg_get_triggerdef_worker(), pg_largeobject_aclmask_snapshot(), pg_largeobject_ownercheck(), RangeDelete(), regclassin(), regoperin(), regprocin(), regtypein(), RelationBuildRuleLock(), RelationBuildTriggers(), RelationBuildTupleDesc(), RelationGetExclusionInfo(), RelationGetIndexList(), RelationRemoveInheritance(), RemoveAmOpEntryById(), RemoveAmProcEntryById(), RemoveAttrDefault(), RemoveAttrDefaultById(), RemoveCollationById(), RemoveConversionById(), RemoveDefaultACLById(), RemoveExtensionById(), RemoveRewriteRuleById(), RemoveRoleFromObjectACL(), RemoveStatistics(), RemoveTriggerById(), RemoveTSConfigurationById(), RenameTableSpace(), renametrig(), ScanPgRelation(), sepgsql_attribute_post_create(), sepgsql_database_post_create(), sepgsql_proc_post_create(), sepgsql_proc_setattr(), sepgsql_relation_post_create(), sepgsql_relation_setattr(), sepgsql_relation_setattr_extra(), sepgsql_schema_post_create(), sequenceIsOwned(), SetSecurityLabel(), SetSharedSecurityLabel(), shdepChangeDep(), shdepDropDependency(), shdepDropOwned(), shdepReassignOwned(), toast_delete_datum(), toast_fetch_datum(), toast_fetch_datum_slice(), toastrel_valueid_exists(), and typeInheritsFrom().
{ entry->sk_flags = 0; entry->sk_attno = attributeNumber; entry->sk_strategy = strategy; entry->sk_subtype = InvalidOid; entry->sk_collation = DEFAULT_COLLATION_OID; entry->sk_argument = argument; fmgr_info(procedure, &entry->sk_func); }