|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/htup_details.h"#include "catalog/pg_operator.h"#include "catalog/pg_type.h"#include "lib/stringinfo.h"#include "nodes/nodeFuncs.h"#include "parser/parse_coerce.h"#include "parser/parse_func.h"#include "parser/parse_oper.h"#include "parser/parse_type.h"#include "utils/builtins.h"#include "utils/inval.h"#include "utils/lsyscache.h"#include "utils/syscache.h"#include "utils/typcache.h"
Go to the source code of this file.
Data Structures | |
| struct | OprCacheKey |
| struct | OprCacheEntry |
Macros | |
| #define | MAX_CACHED_PATH_LEN 16 |
Typedefs | |
| typedef struct OprCacheKey | OprCacheKey |
| typedef struct OprCacheEntry | OprCacheEntry |
Variables | |
| static HTAB * | OprCacheHash = NULL |
| #define MAX_CACHED_PATH_LEN 16 |
Definition at line 49 of file parse_oper.c.
Definition at line 263 of file parse_oper.c.
References fb(), getBaseType(), InvalidOid, OidIsValid, and OpernameGetOprid().
Referenced by oper().
| Operator compatible_oper | ( | ParseState * | pstate, |
| List * | op, | ||
| Oid | arg1, | ||
| Oid | arg2, | ||
| bool | noError, | ||
| int | location | ||
| ) |
Definition at line 453 of file parse_oper.c.
References ereport, errcode(), errmsg(), ERROR, fb(), GETSTRUCT(), IsBinaryCoercible(), op_signature_string(), oper(), parser_errposition(), and ReleaseSysCache().
Referenced by compatible_oper_opid().
Definition at line 490 of file parse_oper.c.
References compatible_oper(), fb(), InvalidOid, oprid(), and ReleaseSysCache().
Referenced by addTargetToSortList(), and ComputeIndexAttrs().
|
static |
Definition at line 1024 of file parse_oper.c.
References CacheRegisterSyscacheCallback(), ctl, fb(), HASH_BLOBS, hash_create(), HASH_ELEM, HASH_FIND, hash_search(), InvalidateOprCacheCallBack(), InvalidOid, HASHCTL::keysize, and OprCacheHash.
Referenced by left_oper(), and oper().
| void get_sort_group_operators | ( | Oid | argtype, |
| bool | needLT, | ||
| bool | needEQ, | ||
| bool | needGT, | ||
| Oid * | ltOpr, | ||
| Oid * | eqOpr, | ||
| Oid * | gtOpr, | ||
| bool * | isHashable | ||
| ) |
Definition at line 181 of file parse_oper.c.
References TypeCacheEntry::eq_opr, ereport, errcode(), errhint(), errmsg(), ERROR, fb(), format_type_be(), TypeCacheEntry::gt_opr, TypeCacheEntry::hash_proc, lookup_type_cache(), TypeCacheEntry::lt_opr, OidIsValid, TYPECACHE_EQ_OPR, TYPECACHE_GT_OPR, TYPECACHE_HASH_PROC, and TYPECACHE_LT_OPR.
Referenced by addTargetToGroupList(), addTargetToSortList(), init_grouping_targets(), makeSortGroupClauseForSetOp(), and std_typanalyze().
Definition at line 1079 of file parse_oper.c.
References Assert, elog, ERROR, fb(), HASH_REMOVE, hash_search(), hash_seq_init(), hash_seq_search(), and OprCacheHash.
Referenced by find_oper_cache_entry().
Definition at line 521 of file parse_oper.c.
References arg, _FuncCandidateList::args, fb(), find_oper_cache_entry(), FUNCDETAIL_NOTFOUND, HeapTupleIsValid, InvalidOid, make_oper_cache_entry(), make_oper_cache_key(), ObjectIdGetDatum(), OidIsValid, op_error(), oper_select_candidate(), OpernameGetCandidates(), OpernameGetOprid(), and SearchSysCache1().
Referenced by generate_operator_name(), and make_op().
| Oid LookupOperName | ( | ParseState * | pstate, |
| List * | opername, | ||
| Oid | oprleft, | ||
| Oid | oprright, | ||
| bool | noError, | ||
| int | location | ||
| ) |
Definition at line 100 of file parse_oper.c.
References ereport, errcode(), errmsg(), ERROR, fb(), InvalidOid, OidIsValid, op_signature_string(), OpernameGetOprid(), and parser_errposition().
Referenced by AggregateCreate(), DefineOpClass(), LookupOperWithArgs(), and OperatorLookup().
| Oid LookupOperWithArgs | ( | ObjectWithArgs * | oper, |
| bool | noError | ||
| ) |
Definition at line 134 of file parse_oper.c.
References Assert, fb(), InvalidOid, linitial_node, list_length(), LookupOperName(), LookupTypeNameOid(), lsecond_node, and oper().
Referenced by AlterOperator(), AlterOpFamilyAdd(), DefineOpClass(), and get_object_address().
| Expr * make_op | ( | ParseState * | pstate, |
| List * | opname, | ||
| Node * | ltree, | ||
| Node * | rtree, | ||
| Node * | last_srf, | ||
| int | location | ||
| ) |
Definition at line 703 of file parse_oper.c.
References OpExpr::args, check_srf_call_placement(), enforce_generic_type_consistency(), ereport, errcode(), errmsg(), ERROR, exprType(), fb(), get_func_retset(), GETSTRUCT(), InvalidOid, left_oper(), list_make1, list_make2, OpExpr::location, make_fn_arguments(), makeNode, op_signature_string(), oper(), OpExpr::opno, oprid(), ParseState::p_last_srf, parser_errposition(), RegProcedureIsValid, and ReleaseSysCache().
Referenced by make_distinct_op(), make_row_comparison_op(), transformAExprIn(), transformAExprNullIf(), and transformAExprOp().
|
static |
Definition at line 1063 of file parse_oper.c.
References Assert, fb(), HASH_ENTER, hash_search(), and OprCacheHash.
Referenced by left_oper(), and oper().
|
static |
Definition at line 980 of file parse_oper.c.
References cancel_parser_errposition_callback(), DeconstructQualifiedName(), fb(), fetch_search_path_array(), LookupExplicitNamespace(), MAX_CACHED_PATH_LEN, MemSet, NAMEDATALEN, setup_parser_errposition_callback(), and strlcpy().
Referenced by left_oper(), and oper().
| Expr * make_scalar_array_op | ( | ParseState * | pstate, |
| List * | opname, | ||
| bool | useOr, | ||
| Node * | ltree, | ||
| Node * | rtree, | ||
| int | location | ||
| ) |
Definition at line 813 of file parse_oper.c.
References ScalarArrayOpExpr::args, enforce_generic_type_consistency(), ereport, errcode(), errmsg(), ERROR, exprType(), fb(), format_type_be(), get_array_type(), get_base_element_type(), get_func_retset(), GETSTRUCT(), InvalidOid, list_make2, ScalarArrayOpExpr::location, make_fn_arguments(), makeNode, OidIsValid, op_signature_string(), oper(), ScalarArrayOpExpr::opno, oprid(), parser_errposition(), RegProcedureIsValid, ReleaseSysCache(), and ScalarArrayOpExpr::useOr.
Referenced by transformAExprIn(), transformAExprOpAll(), and transformAExprOpAny().
|
static |
Definition at line 627 of file parse_oper.c.
References ereport, errcode(), errdetail(), errhint(), errmsg(), ERROR, fb(), FUNCDETAIL_MULTIPLE, op_signature_string(), oper_lookup_failure_details(), and parser_errposition().
Referenced by left_oper(), and oper().
Definition at line 607 of file parse_oper.c.
References appendStringInfo(), appendStringInfoString(), fb(), format_type_be(), initStringInfo(), NameListToString(), and OidIsValid.
Referenced by compatible_oper(), LookupOperName(), make_op(), make_scalar_array_op(), op_error(), and ValidateOperatorReference().
| Operator oper | ( | ParseState * | pstate, |
| List * | opname, | ||
| Oid | ltypeId, | ||
| Oid | rtypeId, | ||
| bool | noError, | ||
| int | location | ||
| ) |
Definition at line 371 of file parse_oper.c.
References binary_oper_exact(), fb(), find_oper_cache_entry(), FUNCDETAIL_NOTFOUND, HeapTupleIsValid, InvalidOid, make_oper_cache_entry(), make_oper_cache_key(), ObjectIdGetDatum(), OidIsValid, op_error(), oper_select_candidate(), OpernameGetCandidates(), and SearchSysCache1().
Referenced by compatible_oper(), Do_MultiXactIdWait(), generate_operator_name(), LookupOperWithArgs(), make_op(), make_SAOP_expr(), make_scalar_array_op(), makeOperatorDependencies(), multi_sort_add_dimension(), MultiXactIdWait(), pushOperator(), tsquery_opr_selec(), tsqueryrecv(), and XactLockTableWait().
Definition at line 652 of file parse_oper.c.
References errdetail(), errhint(), fb(), FGC_NAME_EXISTS, FGC_NAME_VISIBLE, and FGC_SCHEMA_GIVEN.
Referenced by op_error().
|
static |
Definition at line 313 of file parse_oper.c.
References fb(), func_match_argtypes(), func_select_candidate(), FUNCDETAIL_MULTIPLE, FUNCDETAIL_NORMAL, FUNCDETAIL_NOTFOUND, and InvalidOid.
Referenced by left_oper(), and oper().
Definition at line 239 of file parse_oper.c.
References GETSTRUCT().
Referenced by appendOrderByClause(), compatible_oper_opid(), dumpOpr(), generate_operator_name(), inclusion_get_strategy_procinfo(), make_op(), make_scalar_array_op(), minmax_get_strategy_procinfo(), minmax_multi_get_strategy_procinfo(), OperatorIsVisible(), OperatorIsVisibleExt(), patternsel_common(), regoperatorout(), and regoperout().
Definition at line 966 of file parse_oper.c.
Referenced by find_oper_cache_entry(), InvalidateOprCacheCallBack(), and make_oper_cache_entry().