Header And Logo

PostgreSQL
| The world's most advanced open source database.

Data Structures | Defines | Typedefs | Functions

skey.h File Reference

#include "access/attnum.h"
#include "fmgr.h"
Include dependency graph for skey.h:
This graph shows which files directly or indirectly include this file:

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 ScanKeyDataScanKey

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 Documentation

#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
#define BTGreaterStrategyNumber   5
#define BTLessEqualStrategyNumber   2
#define BTLessStrategyNumber   1
#define BTMaxStrategyNumber   5

Definition at line 40 of file skey.h.

Referenced by _bt_preprocess_keys().

#define InvalidStrategy   ((StrategyNumber) 0)
#define SK_ISNULL   0x0001
#define SK_ORDER_BY   0x0100

Definition at line 145 of file skey.h.

#define SK_ROW_END   0x0010
#define SK_ROW_HEADER   0x0004
#define SK_ROW_MEMBER   0x0008
#define SK_SEARCHARRAY   0x0020

Definition at line 141 of file skey.h.

Referenced by _bt_preprocess_array_keys().

#define SK_SEARCHNOTNULL   0x0080
#define SK_SEARCHNULL   0x0040
#define SK_UNARY   0x0002

Definition at line 137 of file skey.h.


Typedef Documentation

typedef ScanKeyData* ScanKey

Definition at line 96 of file skey.h.

typedef struct ScanKeyData ScanKeyData

Definition at line 26 of file skey.h.


Function Documentation

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);
}