PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | ParseState |
struct | ParseNamespaceItem |
struct | ParseNamespaceColumn |
struct | ParseCallbackState |
Typedefs | |
typedef struct ParseState | ParseState |
typedef struct ParseNamespaceItem | ParseNamespaceItem |
typedef struct ParseNamespaceColumn | ParseNamespaceColumn |
typedef enum ParseExprKind | ParseExprKind |
typedef Node *(* | PreParseColumnRefHook) (ParseState *pstate, ColumnRef *cref) |
typedef Node *(* | PostParseColumnRefHook) (ParseState *pstate, ColumnRef *cref, Node *var) |
typedef Node *(* | ParseParamRefHook) (ParseState *pstate, ParamRef *pref) |
typedef Node *(* | CoerceParamHook) (ParseState *pstate, Param *param, Oid targetTypeId, int32 targetTypeMod, int location) |
typedef struct ParseCallbackState | ParseCallbackState |
Functions | |
ParseState * | make_parsestate (ParseState *parentParseState) |
void | free_parsestate (ParseState *pstate) |
int | parser_errposition (ParseState *pstate, int location) |
void | setup_parser_errposition_callback (ParseCallbackState *pcbstate, ParseState *pstate, int location) |
void | cancel_parser_errposition_callback (ParseCallbackState *pcbstate) |
void | transformContainerType (Oid *containerType, int32 *containerTypmod) |
SubscriptingRef * | transformContainerSubscripts (ParseState *pstate, Node *containerBase, Oid containerType, int32 containerTypMod, List *indirection, bool isAssignment) |
Const * | make_const (ParseState *pstate, A_Const *aconst) |
typedef Node*(* CoerceParamHook) (ParseState *pstate, Param *param, Oid targetTypeId, int32 targetTypeMod, int location) |
Definition at line 94 of file parse_node.h.
typedef struct ParseCallbackState ParseCallbackState |
typedef enum ParseExprKind ParseExprKind |
typedef struct ParseNamespaceColumn ParseNamespaceColumn |
Definition at line 1 of file parse_node.h.
typedef struct ParseNamespaceItem ParseNamespaceItem |
Definition at line 1 of file parse_node.h.
typedef Node*(* ParseParamRefHook) (ParseState *pstate, ParamRef *pref) |
Definition at line 93 of file parse_node.h.
typedef struct ParseState ParseState |
Definition at line 1 of file parse_node.h.
typedef Node*(* PostParseColumnRefHook) (ParseState *pstate, ColumnRef *cref, Node *var) |
Definition at line 92 of file parse_node.h.
typedef Node*(* PreParseColumnRefHook) (ParseState *pstate, ColumnRef *cref) |
Definition at line 91 of file parse_node.h.
enum ParseExprKind |
Definition at line 38 of file parse_node.h.
void cancel_parser_errposition_callback | ( | ParseCallbackState * | pcbstate | ) |
Definition at line 156 of file parse_node.c.
References ParseCallbackState::errcallback, error_context_stack, and ErrorContextCallback::previous.
Referenced by addTargetToGroupList(), addTargetToSortList(), coerce_type(), LookupCollation(), LookupTypeNameExtended(), make_const(), make_oper_cache_key(), ParseFuncOrColumn(), parserOpenTable(), transformCreateStmt(), transformSetOperationTree(), transformTableLikeClause(), and typenameTypeMod().
void free_parsestate | ( | ParseState * | pstate | ) |
Definition at line 72 of file parse_node.c.
References ereport, errcode(), errmsg(), ERROR, MaxTupleAttributeNumber, NoLock, ParseState::p_next_resno, ParseState::p_target_relation, pfree(), and table_close().
Referenced by AlterPolicy(), CreatePolicy(), CreateTriggerFiringOn(), inline_function(), interpret_AS_clause(), parse_analyze_fixedparams(), parse_analyze_varparams(), parse_analyze_withcb(), parse_sub_analyze(), standard_ProcessUtility(), transformIndexStmt(), transformInsertStmt(), transformJsonArrayQueryConstructor(), TransformPubWhereClauses(), transformRuleStmt(), and transformStatsStmt().
Const* make_const | ( | ParseState * | pstate, |
A_Const * | aconst | ||
) |
Definition at line 347 of file parse_node.c.
References bit_in(), BoolGetDatum(), boolVal, ValUnion::bsval, BitString::bsval, cancel_parser_errposition_callback(), CStringGetDatum(), DirectFunctionCall3, elog, ERROR, ErrorSaveContext::error_occurred, FLOAT8PASSBYVAL, ValUnion::fval, Float::fval, Int32GetDatum(), Int64GetDatum(), intVal, InvalidOid, A_Const::isnull, A_Const::location, makeConst(), nodeTag, numeric_in(), ObjectIdGetDatum(), pg_strtoint64_safe(), setup_parser_errposition_callback(), strVal, A_Const::val, and val.
Referenced by transformExprRecurse().
ParseState* make_parsestate | ( | ParseState * | parentParseState | ) |
Definition at line 39 of file parse_node.c.
References ParseState::p_coerce_param_hook, ParseState::p_next_resno, ParseState::p_paramref_hook, ParseState::p_post_columnref_hook, ParseState::p_pre_columnref_hook, ParseState::p_queryEnv, ParseState::p_ref_hook_state, ParseState::p_resolve_unknowns, ParseState::p_sourcetext, palloc0(), and ParseState::parentParseState.
Referenced by AddRelationNewConstraints(), AlterDomainDefault(), AlterPolicy(), ATExecAttachPartition(), ATPrepAlterColumnType(), convert_ANY_sublink_to_join(), copy_table(), CreatePolicy(), CreateTriggerFiringOn(), DefineDomain(), DefineRelation(), domainAddCheckConstraint(), ExplainExecuteQuery(), inline_function(), interpret_AS_clause(), parse_analyze_fixedparams(), parse_analyze_varparams(), parse_analyze_withcb(), parse_sub_analyze(), rewriteTargetView(), standard_ProcessUtility(), test_rls_hooks_permissive(), test_rls_hooks_restrictive(), transformAlterTableStmt(), transformCreateStmt(), transformIndexStmt(), transformInsertStmt(), transformJsonArrayQueryConstructor(), transformPartitionSpec(), TransformPubWhereClauses(), transformRuleStmt(), and transformStatsStmt().
int parser_errposition | ( | ParseState * | pstate, |
int | location | ||
) |
Definition at line 106 of file parse_node.c.
References errposition(), ParseState::p_sourcetext, and pg_mbstrlen_with_len().
Referenced by addRangeTableEntryForCTE(), addRangeTableEntryForFunction(), addRangeTableEntryForTableFunc(), AlterDatabase(), analyzeCTE(), analyzeCTETargetList(), array_subscript_transform(), assign_collations_walker(), assign_hypothetical_collations(), check_agg_arguments(), check_agg_arguments_walker(), check_agglevels_and_constraints(), check_lateral_ref_ok(), check_nested_generated_walker(), check_new_partition_bound(), check_parameter_resolution_walker(), check_simple_rowfilter_expr_walker(), check_srf_call_placement(), CheckDuplicateColumnOrPathNames(), checkExprIsVarFree(), checkInsertTargets(), checkJsonOutputFormat(), checkTargetlistEntrySQL92(), checkWellFormedRecursion(), checkWellFormedRecursionWalker(), cluster(), coerce_to_boolean(), coerce_to_common_type(), coerce_to_specific_type_typmod(), colNameToVar(), compatible_oper(), compute_common_attribute(), compute_function_attributes(), ComputePartitionAttrs(), createdb(), CreateTriggerFiringOn(), defGetCopyLogVerbosityChoice(), defGetCopyOnErrorChoice(), DefineCollation(), DefineType(), DropDatabase(), errorConflictingDefElem(), errorMissingColumn(), errorMissingRTE(), EvaluateParams(), ExecReindex(), ExecVacuum(), ExpandAllTables(), ExpandColumnRefStar(), ExplainQuery(), finalize_grouping_exprs_walker(), findTargetlistEntrySQL92(), fixed_paramref_hook(), generateSerialExtraStmts(), GetColumnDefCollation(), GrantRole(), hstore_subscript_transform(), init_params(), interpret_function_parameter_list(), jsonb_subscript_transform(), LookupOperName(), LookupTypeNameExtended(), LookupTypeNameOid(), make_distinct_op(), make_op(), make_row_comparison_op(), make_row_distinct_op(), make_scalar_array_op(), merge_collation_state(), op_error(), parseCheckAggregates(), ParseFuncOrColumn(), parser_coercion_errposition(), pcb_error_callback(), plpgsql_post_column_ref(), ProcessCopyOptions(), resolve_column_ref(), resolve_unique_index_expr(), scanNameSpaceForRefname(), scanNameSpaceForRelid(), scanNSItemForColumn(), scanRTEForColumn(), select_common_collation(), select_common_type(), substitute_grouped_columns_mutator(), TopologicalSort(), transformAExprNullIf(), transformAggregateCall(), transformArrayExpr(), transformAssignedExpr(), transformAssignmentIndirection(), transformAssignmentSubscripts(), transformCaseExpr(), transformCoalesceExpr(), transformCollateClause(), transformColumnDefinition(), transformColumnRef(), transformColumnType(), transformConstraintAttrs(), transformContainerSubscripts(), transformDistinctClause(), transformDistinctOnClause(), transformExprRecurse(), transformFrameOffset(), transformFromClauseItem(), transformGroupingFunc(), transformGroupingSet(), transformIndexConstraint(), transformIndirection(), transformInsertRow(), transformJsonAggConstructor(), transformJsonArrayQueryConstructor(), transformJsonBehavior(), transformJsonFuncExpr(), transformJsonParseArg(), transformJsonParseExpr(), transformJsonReturning(), transformJsonTable(), transformJsonTableColumns(), transformJsonValueExpr(), transformLockingClause(), transformMergeSupportFunc(), transformMultiAssignRef(), transformOnConflictArbiter(), transformParamRef(), transformPartitionBound(), transformPartitionBoundValue(), transformPLAssignStmt(), transformRangeFunction(), transformRangeTableFunc(), transformRangeTableSample(), transformReturningList(), transformRowExpr(), transformSelectStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformSubLink(), transformTableConstraint(), transformUpdateTargetList(), transformValuesClause(), transformWindowDefinitions(), transformWindowFuncCall(), transformWithClause(), transformXmlExpr(), transformXmlSerialize(), typenameType(), typenameTypeMod(), unknown_attribute(), validateInfiniteBounds(), variable_coerce_param_hook(), and variable_paramref_hook().
void setup_parser_errposition_callback | ( | ParseCallbackState * | pcbstate, |
ParseState * | pstate, | ||
int | location | ||
) |
Definition at line 140 of file parse_node.c.
References ErrorContextCallback::arg, ErrorContextCallback::callback, ParseCallbackState::errcallback, error_context_stack, ParseCallbackState::location, pcb_error_callback(), ErrorContextCallback::previous, and ParseCallbackState::pstate.
Referenced by addTargetToGroupList(), addTargetToSortList(), coerce_type(), LookupCollation(), LookupTypeNameExtended(), make_const(), make_oper_cache_key(), ParseFuncOrColumn(), parserOpenTable(), transformCreateStmt(), transformSetOperationTree(), transformTableLikeClause(), and typenameTypeMod().
SubscriptingRef* transformContainerSubscripts | ( | ParseState * | pstate, |
Node * | containerBase, | ||
Oid | containerType, | ||
int32 | containerTypMod, | ||
List * | indirection, | ||
bool | isAssignment | ||
) |
Definition at line 243 of file parse_node.c.
References ereport, errcode(), errmsg(), ERROR, exprLocation(), format_type_be(), getSubscriptingRoutines(), idx(), A_Indices::is_slice, lfirst_node, makeNode, OidIsValid, parser_errposition(), SubscriptingRef::refassgnexpr, SubscriptingRef::refexpr, SubscriptRoutines::transform, and transformContainerType().
Referenced by transformAssignmentSubscripts(), and transformIndirection().
Definition at line 189 of file parse_node.c.
References getBaseTypeAndTypmod().
Referenced by transformAssignmentSubscripts(), and transformContainerSubscripts().