PostgreSQL Source Code
git master
|
Go to the source code of this file.
Functions | |
A_Expr * | makeA_Expr (A_Expr_Kind kind, List *name, Node *lexpr, Node *rexpr, int location) |
A_Expr * | makeSimpleA_Expr (A_Expr_Kind kind, char *name, Node *lexpr, Node *rexpr, int location) |
Var * | makeVar (int varno, AttrNumber varattno, Oid vartype, int32 vartypmod, Oid varcollid, Index varlevelsup) |
Var * | makeVarFromTargetEntry (int varno, TargetEntry *tle) |
Var * | makeWholeRowVar (RangeTblEntry *rte, int varno, Index varlevelsup, bool allowScalar) |
TargetEntry * | makeTargetEntry (Expr *expr, AttrNumber resno, char *resname, bool resjunk) |
TargetEntry * | flatCopyTargetEntry (TargetEntry *src_tle) |
FromExpr * | makeFromExpr (List *fromlist, Node *quals) |
Const * | makeConst (Oid consttype, int32 consttypmod, Oid constcollid, int constlen, Datum constvalue, bool constisnull, bool constbyval) |
Const * | makeNullConst (Oid consttype, int32 consttypmod, Oid constcollid) |
Node * | makeBoolConst (bool value, bool isnull) |
Expr * | makeBoolExpr (BoolExprType boolop, List *args, int location) |
Alias * | makeAlias (const char *aliasname, List *colnames) |
RelabelType * | makeRelabelType (Expr *arg, Oid rtype, int32 rtypmod, Oid rcollid, CoercionForm rformat) |
RangeVar * | makeRangeVar (char *schemaname, char *relname, int location) |
TypeName * | makeTypeName (char *typnam) |
TypeName * | makeTypeNameFromNameList (List *names) |
TypeName * | makeTypeNameFromOid (Oid typeOid, int32 typmod) |
ColumnDef * | makeColumnDef (const char *colname, Oid typeOid, int32 typmod, Oid collOid) |
FuncExpr * | makeFuncExpr (Oid funcid, Oid rettype, List *args, Oid funccollid, Oid inputcollid, CoercionForm fformat) |
FuncCall * | makeFuncCall (List *name, List *args, CoercionForm funcformat, int location) |
Expr * | make_opclause (Oid opno, Oid opresulttype, bool opretset, Expr *leftop, Expr *rightop, Oid opcollid, Oid inputcollid) |
Expr * | make_andclause (List *andclauses) |
Expr * | make_orclause (List *orclauses) |
Expr * | make_notclause (Expr *notclause) |
Node * | make_and_qual (Node *qual1, Node *qual2) |
Expr * | make_ands_explicit (List *andclauses) |
List * | make_ands_implicit (Expr *clause) |
IndexInfo * | makeIndexInfo (int numattrs, int numkeyattrs, Oid amoid, List *expressions, List *predicates, bool unique, bool nulls_not_distinct, bool isready, bool concurrent, bool summarizing) |
DefElem * | makeDefElem (char *name, Node *arg, int location) |
DefElem * | makeDefElemExtended (char *nameSpace, char *name, Node *arg, DefElemAction defaction, int location) |
GroupingSet * | makeGroupingSet (GroupingSetKind kind, List *content, int location) |
VacuumRelation * | makeVacuumRelation (RangeVar *relation, Oid oid, List *va_cols) |
TargetEntry* flatCopyTargetEntry | ( | TargetEntry * | src_tle | ) |
Definition at line 273 of file makefuncs.c.
References Assert(), IsA, and makeNode.
Referenced by expand_insert_targetlist(), process_matched_tle(), rewriteTargetListIU(), set_dummy_tlist_references(), and set_upper_references().
Definition at line 691 of file makefuncs.c.
References list_make2, and make_andclause().
Referenced by AddQual(), and subquery_push_qual().
Definition at line 638 of file makefuncs.c.
References AND_EXPR, BoolExpr::args, BoolExpr::boolop, BoolExpr::location, and makeNode.
Referenced by eval_const_expressions_mutator(), ExplainNode(), find_duplicate_ors(), make_and_qual(), make_ands_explicit(), make_sub_restrictinfos(), negate_clause(), process_duplicate_ors(), process_sublinks_mutator(), and pull_up_sublinks_qual_recurse().
Definition at line 710 of file makefuncs.c.
References linitial, list_length(), make_andclause(), makeBoolConst(), and NIL.
Referenced by ATExecAttachPartition(), check_default_partition_contents(), convert_EXISTS_to_ANY(), create_bitmap_subplan(), DetachAddConstraintIfNeeded(), ExecInitCheck(), extract_or_clause(), get_proposed_default_constraint(), get_qual_for_list(), show_qual(), and UpdateIndexRelation().
Definition at line 721 of file makefuncs.c.
References DatumGetBool(), is_andclause(), IsA, list_make1, and NIL.
Referenced by apply_child_basequals(), ConstraintImpliedByRelConstraint(), convert_EXISTS_to_ANY(), cost_subplan(), DefineIndex(), DoCopy(), get_proposed_default_constraint(), get_relation_constraints(), index_concurrently_create_copy(), preprocess_expression(), RelationGetIndexPredicate(), test_predtest(), and TriggerEnabled().
Definition at line 670 of file makefuncs.c.
References BoolExpr::args, BoolExpr::boolop, list_make1, BoolExpr::location, makeNode, and NOT_EXPR.
Referenced by negate_clause().
Expr* make_opclause | ( | Oid | opno, |
Oid | opresulttype, | ||
bool | opretset, | ||
Expr * | leftop, | ||
Expr * | rightop, | ||
Oid | opcollid, | ||
Oid | inputcollid | ||
) |
Definition at line 612 of file makefuncs.c.
References OpExpr::args, InvalidOid, list_make1, list_make2, OpExpr::location, makeNode, and OpExpr::opno.
Referenced by build_implied_join_equality(), convert_EXISTS_to_ANY(), expand_indexqual_rowcompare(), find_window_run_conditions(), make_partition_op_expr(), match_boolean_index_clause(), match_clause_to_partition_key(), match_network_subset(), match_pattern_prefix(), operator_predicate_proof(), process_implied_equality(), and rewriteSearchAndCycle().
Definition at line 654 of file makefuncs.c.
References BoolExpr::args, BoolExpr::boolop, BoolExpr::location, makeNode, and OR_EXPR.
Referenced by create_bitmap_subplan(), create_tidscan_plan(), eval_const_expressions_mutator(), ExplainNode(), extract_or_clause(), make_sub_restrictinfos(), negate_clause(), pgoutput_row_filter_init(), process_duplicate_ors(), and process_sublinks_mutator().
A_Expr* makeA_Expr | ( | A_Expr_Kind | kind, |
List * | name, | ||
Node * | lexpr, | ||
Node * | rexpr, | ||
int | location | ||
) |
Definition at line 30 of file makefuncs.c.
Definition at line 389 of file makefuncs.c.
References a, makeNode, and pstrdup().
Referenced by addRangeTableEntry(), addRangeTableEntryForCTE(), addRangeTableEntryForENR(), addRangeTableEntryForFunction(), addRangeTableEntryForJoin(), addRangeTableEntryForRelation(), addRangeTableEntryForSubquery(), addRangeTableEntryForTableFunc(), addRangeTableEntryForValues(), check_sql_fn_retval(), convert_ANY_sublink_to_join(), CreateTriggerFiringOn(), deparse_context_for(), expand_single_inheritance_child(), pg_get_triggerdef_worker(), pull_up_simple_values(), replace_empty_jointree(), rewriteSearchAndCycle(), rewriteTargetView(), transform_MERGE_to_join(), transformInsertStmt(), transformOnConflictClause(), transformRuleStmt(), and transformSetOperationTree().
Definition at line 359 of file makefuncs.c.
References BoolGetDatum(), InvalidOid, makeConst(), and value.
Referenced by create_append_plan(), eval_const_expressions_mutator(), find_duplicate_ors(), get_qual_for_range(), make_ands_explicit(), make_row_distinct_op(), match_boolean_index_clause(), match_boolean_partition_clause(), negate_clause(), process_duplicate_ors(), and reconsider_outer_join_clauses().
Expr* makeBoolExpr | ( | BoolExprType | boolop, |
List * | args, | ||
int | location | ||
) |
Definition at line 371 of file makefuncs.c.
References generate_unaccent_rules::args, b, boolop(), and makeNode.
Referenced by add_security_quals(), add_with_check_options(), get_partition_qual_relid(), get_proposed_default_constraint(), get_qual_for_list(), get_qual_for_range(), make_partition_op_expr(), make_row_comparison_op(), make_row_distinct_op(), match_clause_to_partition_key(), transformAExprBetween(), transformAExprDistinct(), transformAExprIn(), transformBoolExpr(), and transformJoinUsingClause().
Definition at line 492 of file makefuncs.c.
References ColumnDef::collClause, ColumnDef::collOid, ColumnDef::colname, ColumnDef::constraints, ColumnDef::cooked_default, ColumnDef::fdwoptions, ColumnDef::inhcount, ColumnDef::is_from_type, ColumnDef::is_local, ColumnDef::is_not_null, ColumnDef::location, makeNode, makeTypeNameFromOid(), NIL, pstrdup(), ColumnDef::raw_default, ColumnDef::storage, and ColumnDef::typeName.
Referenced by create_ctas_nodata(), DefineVirtualRelation(), and intorel_startup().
Const* makeConst | ( | Oid | consttype, |
int32 | consttypmod, | ||
Oid | constcollid, | ||
int | constlen, | ||
Datum | constvalue, | ||
bool | constisnull, | ||
bool | constbyval | ||
) |
Definition at line 301 of file makefuncs.c.
References Const::consttype, makeNode, PG_DETOAST_DATUM, and PointerGetDatum().
Referenced by add_security_quals(), add_with_check_options(), array_subscript_transform(), build_coercion_expression(), build_minmax_path(), check_sql_fn_retval(), create_final_distinct_paths(), eval_const_expressions_mutator(), evaluate_expr(), expand_insert_targetlist(), generate_setop_tlist(), get_qual_for_hash(), get_qual_for_list(), get_typdefault(), make_const(), makeBoolConst(), makeNullConst(), match_clause_to_partition_key(), match_network_subset(), pattern_fixed_prefix(), RelationGetDummyIndexExpressions(), rewriteSearchAndCycle(), rewriteTargetListIU(), rewriteValuesRTE(), scalararraysel(), set_fn_opclass_options(), string_to_bytea_const(), and string_to_const().
Definition at line 548 of file makefuncs.c.
References arg, DEFELEM_UNSPEC, makeNode, name, and res.
Referenced by buildDefItem(), copy_table(), DefineView(), fileGetForeignPaths(), generateSerialExtraStmts(), get_file_fdw_attribute_options(), pg_logical_slot_get_changes_guts(), sequence_options(), transformAlterTableStmt(), and untransformRelOptions().
DefElem* makeDefElemExtended | ( | char * | nameSpace, |
char * | name, | ||
Node * | arg, | ||
DefElemAction | defaction, | ||
int | location | ||
) |
Definition at line 566 of file makefuncs.c.
Definition at line 287 of file makefuncs.c.
References FromExpr::fromlist, makeNode, and FromExpr::quals.
Referenced by check_sql_fn_retval(), pull_up_sublinks(), pull_up_sublinks_jointree_recurse(), remove_useless_results_recurse(), rewriteSearchAndCycle(), transformDeleteStmt(), transformMergeStmt(), transformPLAssignStmt(), transformReturnStmt(), transformRuleStmt(), transformSelectStmt(), transformSetOperationStmt(), transformUpdateStmt(), and transformValuesClause().
FuncCall* makeFuncCall | ( | List * | name, |
List * | args, | ||
CoercionForm | funcformat, | ||
int | location | ||
) |
Definition at line 587 of file makefuncs.c.
References FuncCall::agg_distinct, FuncCall::agg_filter, FuncCall::agg_order, FuncCall::agg_star, FuncCall::agg_within_group, generate_unaccent_rules::args, FuncCall::args, FuncCall::func_variadic, FuncCall::funcformat, FuncCall::funcname, FuncCall::location, makeNode, name, NIL, and FuncCall::over.
Referenced by test_rls_hooks_permissive(), test_rls_hooks_restrictive(), transformColumnDefinition(), and transformRangeFunction().
FuncExpr* makeFuncExpr | ( | Oid | funcid, |
Oid | rettype, | ||
List * | args, | ||
Oid | funccollid, | ||
Oid | inputcollid, | ||
CoercionForm | fformat | ||
) |
Definition at line 521 of file makefuncs.c.
References generate_unaccent_rules::args, FuncExpr::args, FuncExpr::funcid, FuncExpr::location, and makeNode.
Referenced by build_aggregate_deserialfn_expr(), build_aggregate_finalfn_expr(), build_aggregate_serialfn_expr(), build_aggregate_transfn_expr(), build_coercion_expression(), get_qual_for_hash(), make_path_cat_expr(), and rewriteSearchAndCycle().
GroupingSet* makeGroupingSet | ( | GroupingSetKind | kind, |
List * | content, | ||
int | location | ||
) |
Definition at line 804 of file makefuncs.c.
References GroupingSet::content, GroupingSet::location, and makeNode.
Referenced by flatten_grouping_sets(), transformGroupClause(), and transformGroupingSet().
IndexInfo* makeIndexInfo | ( | int | numattrs, |
int | numkeyattrs, | ||
Oid | amoid, | ||
List * | expressions, | ||
List * | predicates, | ||
bool | unique, | ||
bool | nulls_not_distinct, | ||
bool | isready, | ||
bool | concurrent, | ||
bool | summarizing | ||
) |
Definition at line 745 of file makefuncs.c.
References Assert(), CurrentMemoryContext, IndexInfo::ii_Am, IndexInfo::ii_AmCache, IndexInfo::ii_BrokenHotChain, IndexInfo::ii_CheckedUnchanged, IndexInfo::ii_Concurrent, IndexInfo::ii_Context, IndexInfo::ii_ExclusionOps, IndexInfo::ii_ExclusionProcs, IndexInfo::ii_ExclusionStrats, IndexInfo::ii_Expressions, IndexInfo::ii_ExpressionsState, IndexInfo::ii_IndexUnchanged, IndexInfo::ii_NullsNotDistinct, IndexInfo::ii_NumIndexAttrs, IndexInfo::ii_NumIndexKeyAttrs, IndexInfo::ii_OpclassOptions, IndexInfo::ii_ParallelWorkers, IndexInfo::ii_Predicate, IndexInfo::ii_PredicateState, IndexInfo::ii_ReadyForInserts, IndexInfo::ii_Summarizing, IndexInfo::ii_Unique, IndexInfo::ii_UniqueOps, IndexInfo::ii_UniqueProcs, IndexInfo::ii_UniqueStrats, makeNode, and NIL.
Referenced by BuildDummyIndexInfo(), BuildIndexInfo(), CheckIndexCompatible(), DefineIndex(), and index_concurrently_create_copy().
Definition at line 339 of file makefuncs.c.
References get_typlenbyval(), and makeConst().
Referenced by adjust_appendrel_attrs_mutator(), ATExecAddColumn(), build_subplan(), BuildOnConflictExcludedTargetlist(), coerce_record_to_complex(), eval_const_expressions_mutator(), evaluate_function(), ExecInitExprRec(), expandRTE(), expandTupleDesc(), remove_unused_subquery_outputs(), ReplaceVarsFromTargetList_callback(), rewriteValuesRTE(), rewriteValuesRTEToNulls(), set_plan_refs(), and transformAssignedExpr().
RangeVar* makeRangeVar | ( | char * | schemaname, |
char * | relname, | ||
int | location | ||
) |
Definition at line 424 of file makefuncs.c.
References RangeVar::alias, RangeVar::catalogname, RangeVar::inh, RangeVar::location, makeNode, relname, RangeVar::relname, RangeVar::relpersistence, and RangeVar::schemaname.
Referenced by AlterTableNamespace(), ATParseTransformCmd(), autovacuum_do_vac_analyze(), boot_openrel(), BootstrapToastTable(), DoCopy(), ExpandColumnRefStar(), fetch_table_list(), generateSerialExtraStmts(), logicalrep_rel_open(), LookupTypeNameExtended(), makeRangeVarFromNameList(), plpgsql_parse_cwordrowtype(), plpgsql_parse_cwordtype(), transformAlterTableStmt(), and transformColumnRef().
RelabelType* makeRelabelType | ( | Expr * | arg, |
Oid | rtype, | ||
int32 | rtypmod, | ||
Oid | rcollid, | ||
CoercionForm | rformat | ||
) |
Definition at line 404 of file makefuncs.c.
References arg, RelabelType::arg, RelabelType::location, makeNode, and RelabelType::resulttype.
Referenced by assign_hypothetical_collations(), buildMergedJoinVar(), coerce_type(), and make_partition_op_expr().
A_Expr* makeSimpleA_Expr | ( | A_Expr_Kind | kind, |
char * | name, | ||
Node * | lexpr, | ||
Node * | rexpr, | ||
int | location | ||
) |
Definition at line 48 of file makefuncs.c.
References a, list_make1, makeNode, makeString(), and name.
Referenced by test_rls_hooks_permissive(), test_rls_hooks_restrictive(), transformAExprBetween(), transformCaseExpr(), and transformJoinUsingClause().
TargetEntry* makeTargetEntry | ( | Expr * | expr, |
AttrNumber | resno, | ||
char * | resname, | ||
bool | resjunk | ||
) |
Definition at line 240 of file makefuncs.c.
References TargetEntry::expr, InvalidOid, makeNode, TargetEntry::resno, and TargetEntry::ressortgroupref.
Referenced by add_row_identity_var(), add_to_flat_tlist(), ApplyRetrieveRule(), build_index_tlist(), build_minmax_path(), build_path_tlist(), build_physical_tlist(), build_remote_returning(), BuildOnConflictExcludedTargetlist(), check_sql_fn_retval(), coerce_fn_result_column(), convert_combining_aggrefs(), convert_EXISTS_to_ANY(), create_unique_plan(), determineRecursiveColTypes(), ExecInitSubPlan(), expand_inherited_rtentry(), expand_insert_targetlist(), expandNSItemAttrs(), ExpandRowReference(), foreign_grouping_ok(), generate_append_tlist(), generate_setop_tlist(), make_tlist_from_pathtarget(), prepare_sort_from_pathkeys(), preprocess_targetlist(), pull_up_constant_function(), pull_up_simple_values(), rebuild_fdw_scan_tlist(), rewriteSearchAndCycle(), rewriteTargetListIU(), transformAggregateCall(), transformMergeStmt(), transformMultiAssignRef(), transformReturnStmt(), transformSetOperationStmt(), transformSetOperationTree(), and transformTargetEntry().
TypeName* makeTypeName | ( | char * | typnam | ) |
Definition at line 446 of file makefuncs.c.
References list_make1, makeString(), and makeTypeNameFromNameList().
Referenced by plpgsql_parse_wordrowtype(), and plpgsql_parse_wordtype().
Definition at line 458 of file makefuncs.c.
References TypeName::location, makeNode, TypeName::names, NIL, TypeName::typemod, and TypeName::typmods.
Referenced by AlterDomainAddConstraint(), AlterDomainDefault(), AlterDomainDropConstraint(), AlterDomainNotNull(), AlterDomainValidateConstraint(), AlterEnum(), AlterType(), AlterTypeNamespace(), AlterTypeOwner(), defGetTypeName(), FuncNameAsType(), makeTypeName(), objectNamesToOids(), plpgsql_parse_cwordrowtype(), RebuildConstraintComment(), RenameConstraint(), and RenameType().
Definition at line 474 of file makefuncs.c.
References TypeName::location, makeNode, TypeName::typemod, and TypeName::typeOid.
Referenced by DefineSequence(), generateSerialExtraStmts(), makeColumnDef(), MergeAttributes(), transformAlterTableStmt(), transformOfType(), and transformTableLikeClause().
VacuumRelation* makeVacuumRelation | ( | RangeVar * | relation, |
Oid | oid, | ||
List * | va_cols | ||
) |
Definition at line 819 of file makefuncs.c.
References makeNode, VacuumRelation::oid, VacuumRelation::relation, and VacuumRelation::va_cols.
Referenced by autovacuum_do_vac_analyze(), expand_vacuum_rel(), and get_all_vacuum_rels().
Var* makeVar | ( | int | varno, |
AttrNumber | varattno, | ||
Oid | vartype, | ||
int32 | vartypmod, | ||
Oid | varcollid, | ||
Index | varlevelsup | ||
) |
Definition at line 66 of file makefuncs.c.
References Var::location, makeNode, Var::varattno, Var::varlevelsup, and Var::varno.
Referenced by add_row_identity_columns(), ATPrepAlterColumnType(), build_index_tlist(), build_physical_tlist(), build_remote_returning(), BuildOnConflictExcludedTargetlist(), buildVarFromNSColumn(), eval_const_expressions_mutator(), expand_inherited_rtentry(), expand_single_inheritance_child(), expandNSItemVars(), expandRTE(), expandTupleDesc(), fix_indexqual_operand(), generate_append_tlist(), generate_setop_tlist(), get_qual_for_hash(), get_qual_for_list(), get_range_key_properties(), get_range_nulltest(), get_relation_constraints(), make_inh_translation_list(), make_path_cat_expr(), make_path_rowexpr(), makeVarFromTargetEntry(), makeWholeRowVar(), NotNullImpliedByRelConstraints(), PartConstraintImpliedByRelConstraint(), postgresAddForeignUpdateTargets(), preprocess_targetlist(), rewriteSearchAndCycle(), scanNSItemForColumn(), set_baserel_partition_key_exprs(), set_dummy_tlist_references(), transformAssignedExpr(), and transformSetOperationStmt().
Var* makeVarFromTargetEntry | ( | int | varno, |
TargetEntry * | tle | ||
) |
Definition at line 105 of file makefuncs.c.
References TargetEntry::expr, exprCollation(), exprType(), exprTypmod(), makeVar(), and TargetEntry::resno.
Referenced by build_physical_tlist(), coerce_fn_result_column(), generate_subquery_vars(), make_setop_translation_list(), search_indexed_tlist_for_non_var(), search_indexed_tlist_for_phv(), search_indexed_tlist_for_sortgroupref(), and transformInsertStmt().
Var* makeWholeRowVar | ( | RangeTblEntry * | rte, |
int | varno, | ||
Index | varlevelsup, | ||
bool | allowScalar | ||
) |
Definition at line 135 of file makefuncs.c.
References ereport, errcode(), errmsg(), ERROR, exprCollation(), exprType(), RangeTblEntry::funcordinality, RangeTblEntry::functions, get_rel_name(), get_rel_type_id(), InvalidAttrNumber, InvalidOid, linitial, list_length(), makeVar(), OidIsValid, RangeTblEntry::relid, RTE_FUNCTION, RTE_RELATION, RangeTblEntry::rtekind, and type_is_rowtype().
Referenced by ApplyRetrieveRule(), expand_inherited_rtentry(), preprocess_targetlist(), and transformWholeRowRef().