#include "postgres.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
#include "executor/executor.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
#include "nodes/pathnodes.h"
#include "optimizer/optimizer.h"
#include "utils/array.h"
#include "utils/inval.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"
Go to the source code of this file.
Definition at line 72 of file predtest.c.
Definition at line 78 of file predtest.c.
Definition at line 40 of file predtest.c.
Definition at line 1670 of file predtest.c.
Definition at line 1664 of file predtest.c.
Definition at line 1665 of file predtest.c.
Definition at line 1666 of file predtest.c.
Definition at line 1663 of file predtest.c.
Definition at line 1662 of file predtest.c.
Definition at line 1667 of file predtest.c.
Definition at line 57 of file predtest.c.
Enumerator | |
---|---|
CLASS_ATOM | |
CLASS_AND | |
CLASS_OR |
Definition at line 50 of file predtest.c.
Definition at line 1021 of file predtest.c.
References list_free(), pfree(), and PredIterInfoData::state.
Referenced by predicate_classify().
Definition at line 1008 of file predtest.c.
References if(), and PredIterInfoData::state.
Referenced by predicate_classify().
Definition at line 959 of file predtest.c.
References ScalarArrayOpExpr::args, ARR_ELEMTYPE, DatumGetArrayTypeP, deconstruct_array(), get_typlenbyvalalign(), InvalidOid, list_copy(), lsecond, ScalarArrayOpExpr::opno, palloc(), and PredIterInfoData::state.
Referenced by predicate_classify().
Definition at line 1081 of file predtest.c.
References list_free(), pfree(), and PredIterInfoData::state.
Referenced by predicate_classify().
Definition at line 1069 of file predtest.c.
References if(), lfirst, lnext(), lsecond, state::next, PredIterInfoData::state, and PredIterInfoData::state_list.
Referenced by predicate_classify().
Definition at line 1042 of file predtest.c.
References ScalarArrayOpExpr::args, InvalidOid, list_copy(), list_head(), lsecond, state::next, ScalarArrayOpExpr::opno, palloc(), PredIterInfoData::state, and PredIterInfoData::state_list.
Referenced by predicate_classify().
Definition at line 938 of file predtest.c.
References list_head(), PredIterInfoData::state, and PredIterInfoData::state_list.
Referenced by predicate_classify().
Definition at line 1460 of file predtest.c.
References arg, ScalarArrayOpExpr::args, ARR_DIMS, ARR_NDIM, ArrayGetNItems(), clause_is_strict_for(), DatumGetArrayTypeP, equal(), func_strict(), is_funcclause(), is_opclause(), IsA, lfirst, linitial, list_length(), lsecond, op_strict(), ScalarArrayOpExpr::opno, and ScalarArrayOpExpr::useOr.
Referenced by clause_is_strict_for(), predicate_implied_by_simple_clause(), and predicate_refuted_by_simple_clause().
Definition at line 1386 of file predtest.c.
References BooleanTest::arg, BoolExpr::args, BoolExpr::boolop, BooleanTest::booltesttype, IS_FALSE, IS_NOT_TRUE, IS_UNKNOWN, IsA, linitial, and NOT_EXPR.
Referenced by predicate_refuted_by_recurse().
Definition at line 1414 of file predtest.c.
References BooleanTest::arg, BoolExpr::args, BoolExpr::boolop, BooleanTest::booltesttype, IS_FALSE, IsA, linitial, and NOT_EXPR.
Referenced by predicate_refuted_by_recurse().
Definition at line 2330 of file predtest.c.
References OprProofCacheEntry::implic_test_op, lookup_proof_cache(), and OprProofCacheEntry::refute_test_op.
Referenced by operator_predicate_proof().
Definition at line 2346 of file predtest.c.
References Assert(), hash_seq_init(), hash_seq_search(), OprProofCacheEntry::have_implic, OprProofCacheEntry::have_refute, and OprProofCacheHash.
Referenced by lookup_proof_cache().
Definition at line 928 of file predtest.c.
Referenced by predicate_classify().
Definition at line 915 of file predtest.c.
References if(), lfirst, lnext(), PredIterInfoData::state, and PredIterInfoData::state_list.
Referenced by predicate_classify().
Definition at line 908 of file predtest.c.
References list_head(), PredIterInfoData::state, and PredIterInfoData::state_list.
Referenced by predicate_classify().
Definition at line 2101 of file predtest.c.
References Assert(), CacheRegisterSyscacheCallback(), OpIndexInterpretation::cmptype, COMPARE_EQ, ctl, get_negator(), get_op_index_interpretation(), get_opfamily_member_for_cmptype(), HASH_BLOBS, hash_create(), HASH_ELEM, HASH_ENTER, hash_search(), OprProofCacheEntry::have_implic, OprProofCacheEntry::have_refute, OprProofCacheEntry::implic_test_op, InvalidateOprProofCacheCallBack(), InvalidOid, sort-test::key, lfirst, list_free_deep(), NIL, OidIsValid, op_volatile(), OpIndexInterpretation::opfamily_id, OpIndexInterpretation::oplefttype, OpIndexInterpretation::oprighttype, OprProofCacheHash, RC_implic_table, RC_implies_table, RC_refute_table, RC_refutes_table, RCNE, OprProofCacheEntry::refute_test_op, OprProofCacheEntry::same_subexprs_implies, and OprProofCacheEntry::same_subexprs_refutes.
Referenced by get_btree_test_op(), and operator_same_subexprs_lookup().
Definition at line 1779 of file predtest.c.
References OpExpr::args, CreateExecutorState(), DatumGetBool(), DEBUG2, elog, equal(), EState::es_query_cxt, ExecEvalExprSwitchContext(), ExecInitExpr(), fix_opfuncids(), FreeExecutorState(), get_btree_test_op(), get_commutator(), GetPerTupleExprContext, InvalidOid, is_opclause(), IsA, linitial, list_length(), lsecond, make_opclause(), MemoryContextSwitchTo(), OidIsValid, op_strict(), operator_same_subexprs_proof(), and OpExpr::opno.
Referenced by predicate_implied_by_simple_clause(), and predicate_refuted_by_simple_clause().
Definition at line 2305 of file predtest.c.
References lookup_proof_cache(), OprProofCacheEntry::same_subexprs_implies, and OprProofCacheEntry::same_subexprs_refutes.
Referenced by operator_same_subexprs_proof().
Definition at line 2032 of file predtest.c.
References get_negator(), and operator_same_subexprs_lookup().
Referenced by operator_predicate_proof().
Definition at line 826 of file predtest.c.
References ScalarArrayOpExpr::args, ARR_DIMS, ARR_NDIM, arrayconst_cleanup_fn(), arrayconst_next_fn(), arrayconst_startup_fn(), arrayexpr_cleanup_fn(), arrayexpr_next_fn(), arrayexpr_startup_fn(), ArrayGetNItems(), Assert(), boolexpr_startup_fn(), CLASS_AND, CLASS_ATOM, CLASS_OR, PredIterInfoData::cleanup_fn, DatumGetArrayTypeP, is_andclause(), is_orclause(), IsA, list_cleanup_fn(), list_length(), list_next_fn(), list_startup_fn(), lsecond, MAX_SAOP_ARRAY_SIZE, PredIterInfoData::next_fn, PredIterInfoData::startup_fn, and ScalarArrayOpExpr::useOr.
Referenced by predicate_implied_by_recurse(), and predicate_refuted_by_recurse().
Definition at line 152 of file predtest.c.
References linitial, list_length(), NIL, and predicate_implied_by_recurse().
Referenced by add_predicate_to_index_quals(), build_paths_for_OR(), check_index_predicates(), choose_bitmap_and(), ConstraintImpliedByRelConstraint(), create_bitmap_scan_plan(), create_bitmap_subplan(), create_indexscan_plan(), infer_arbiter_indexes(), and test_predtest().
Definition at line 290 of file predtest.c.
References Assert(), CLASS_AND, CLASS_ATOM, CLASS_OR, elog, ERROR, IsA, iterate_begin, iterate_end, predicate_classify(), predicate_implied_by_recurse(), and predicate_implied_by_simple_clause().
Referenced by predicate_implied_by(), predicate_implied_by_recurse(), and predicate_refuted_by_recurse().
Definition at line 1098 of file predtest.c.
References NullTest::arg, OpExpr::args, Assert(), CHECK_FOR_INTERRUPTS, clause_is_strict_for(), DatumGetBool(), equal(), get_notclausearg(), IS_NOT_NULL, is_notclause(), IS_NULL, IsA, linitial, list_length(), lsecond, nodeTag, NullTest::nulltesttype, operator_predicate_proof(), and OpExpr::opno.
Referenced by predicate_implied_by_recurse().
Definition at line 222 of file predtest.c.
References linitial, list_length(), NIL, and predicate_refuted_by_recurse().
Referenced by gen_partprune_steps_internal(), relation_excluded_by_constraints(), and test_predtest().
Definition at line 531 of file predtest.c.
References Assert(), CLASS_AND, CLASS_ATOM, CLASS_OR, elog, ERROR, extract_not_arg(), extract_strong_not_arg(), IsA, iterate_begin, iterate_end, predicate_classify(), predicate_implied_by_recurse(), predicate_refuted_by_recurse(), and predicate_refuted_by_simple_clause().
Referenced by predicate_refuted_by(), and predicate_refuted_by_recurse().
Definition at line 1225 of file predtest.c.
References NullTest::arg, CHECK_FOR_INTERRUPTS, clause_is_strict_for(), equal(), IS_NOT_NULL, IS_NULL, nodeTag, NullTest::nulltesttype, and operator_predicate_proof().
Referenced by predicate_refuted_by_recurse().
Definition at line 2093 of file predtest.c.
Referenced by InvalidateOprProofCacheCallBack(), and lookup_proof_cache().