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 (Index varno, AttrNumber varattno, Oid vartype, int32 vartypmod, Oid varcollid, Index varlevelsup) |
Var * | makeVarFromTargetEntry (Index varno, TargetEntry *tle) |
Var * | makeWholeRowVar (RangeTblEntry *rte, Index 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 isready, bool concurrent) |
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 271 of file makefuncs.c.
References Assert, IsA, and makeNode.
Referenced by expand_targetlist(), process_matched_tle(), rewriteTargetListIU(), set_dummy_tlist_references(), and set_upper_references().
Definition at line 689 of file makefuncs.c.
References list_make2, and make_andclause().
Referenced by AddQual(), and subquery_push_qual().
Definition at line 636 of file makefuncs.c.
References AND_EXPR, BoolExpr::args, BoolExpr::boolop, BoolExpr::location, and makeNode.
Referenced by eval_const_expressions_mutator(), 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 708 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(), ExecInitCheck(), extract_or_clause(), get_proposed_default_constraint(), get_qual_for_list(), show_qual(), and UpdateIndexRelation().
Definition at line 719 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 668 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 610 of file makefuncs.c.
References OpExpr::args, OpExpr::inputcollid, InvalidOid, list_make1, list_make2, OpExpr::location, makeNode, OpExpr::opcollid, OpExpr::opfuncid, OpExpr::opno, OpExpr::opresulttype, and OpExpr::opretset.
Referenced by build_implied_join_equality(), convert_EXISTS_to_ANY(), expand_indexqual_rowcompare(), 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 652 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(), 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.
References A_Expr::kind, A_Expr::lexpr, A_Expr::location, makeNode, A_Expr::name, name, and A_Expr::rexpr.
Definition at line 387 of file makefuncs.c.
References Alias::aliasname, Alias::colnames, makeNode, and pstrdup().
Referenced by addRangeTableEntry(), addRangeTableEntryForCTE(), addRangeTableEntryForENR(), addRangeTableEntryForFunction(), addRangeTableEntryForJoin(), addRangeTableEntryForRelation(), addRangeTableEntryForTableFunc(), addRangeTableEntryForValues(), check_sql_fn_retval(), convert_ANY_sublink_to_join(), CreateTrigger(), deparse_context_for(), expand_single_inheritance_child(), pg_get_triggerdef_worker(), pull_up_simple_values(), replace_empty_jointree(), rewriteSearchAndCycle(), rewriteTargetView(), transformInsertStmt(), transformOnConflictClause(), transformRuleStmt(), transformSetOperationTree(), and UpdateRangeTableOfViewParse().
Definition at line 357 of file makefuncs.c.
References BoolGetDatum, InvalidOid, and makeConst().
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(), and process_duplicate_ors().
Expr* makeBoolExpr | ( | BoolExprType | boolop, |
List * | args, | ||
int | location | ||
) |
Definition at line 369 of file makefuncs.c.
References generate_unaccent_rules::args, BoolExpr::args, boolop(), BoolExpr::boolop, BoolExpr::location, 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 490 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 299 of file makefuncs.c.
References Const::constbyval, Const::constcollid, Const::constisnull, Const::constlen, Const::consttype, Const::consttypmod, Const::constvalue, Const::location, makeNode, PG_DETOAST_DATUM, and PointerGetDatum.
Referenced by add_security_quals(), add_with_check_options(), adjust_partition_tlist(), array_subscript_transform(), build_coercion_expression(), build_minmax_path(), check_sql_fn_retval(), eval_const_expressions_mutator(), evaluate_expr(), expand_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 546 of file makefuncs.c.
References arg, DefElem::arg, DefElem::defaction, DEFELEM_UNSPEC, DefElem::defname, DefElem::defnamespace, DefElem::location, makeNode, and name.
Referenced by buildDefItem(), 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 564 of file makefuncs.c.
References arg, DefElem::arg, DefElem::defaction, DefElem::defname, DefElem::defnamespace, DefElem::location, makeNode, and name.
Definition at line 285 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(), transformInsertStmt(), transformPLAssignStmt(), transformRuleStmt(), transformSelectStmt(), transformSetOperationStmt(), transformUpdateStmt(), and transformValuesClause().
FuncCall* makeFuncCall | ( | List * | name, |
List * | args, | ||
CoercionForm | funcformat, | ||
int | location | ||
) |
Definition at line 585 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 519 of file makefuncs.c.
References generate_unaccent_rules::args, FuncExpr::args, FuncExpr::funccollid, FuncExpr::funcformat, FuncExpr::funcid, FuncExpr::funcresulttype, FuncExpr::funcretset, FuncExpr::funcvariadic, FuncExpr::inputcollid, FuncExpr::location, and makeNode.
Referenced by build_aggregate_combinefn_expr(), 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 794 of file makefuncs.c.
References GroupingSet::content, GroupingSet::kind, 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 | isready, | ||
bool | concurrent | ||
) |
Definition at line 743 of file makefuncs.c.
References Assert, CurrentMemoryContext, IndexInfo::ii_Am, IndexInfo::ii_AmCache, IndexInfo::ii_BrokenHotChain, IndexInfo::ii_Concurrent, IndexInfo::ii_Context, IndexInfo::ii_ExclusionOps, IndexInfo::ii_ExclusionProcs, IndexInfo::ii_ExclusionStrats, IndexInfo::ii_Expressions, IndexInfo::ii_ExpressionsState, IndexInfo::ii_NumIndexAttrs, IndexInfo::ii_NumIndexKeyAttrs, IndexInfo::ii_OpclassOptions, IndexInfo::ii_ParallelWorkers, IndexInfo::ii_Predicate, IndexInfo::ii_PredicateState, IndexInfo::ii_ReadyForInserts, 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 337 of file makefuncs.c.
References get_typlenbyval(), and makeConst().
Referenced by ATExecAddColumn(), build_subplan(), BuildOnConflictExcludedTargetlist(), coerce_record_to_complex(), eval_const_expressions_mutator(), evaluate_function(), ExecInitExprRec(), expandRTE(), expandTupleDesc(), remove_unused_subquery_outputs(), ReplaceVarsFromTargetList_callback(), rewriteValuesRTE(), and transformAssignedExpr().
RangeVar* makeRangeVar | ( | char * | schemaname, |
char * | relname, | ||
int | location | ||
) |
Definition at line 422 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 402 of file makefuncs.c.
References arg, RelabelType::arg, RelabelType::location, makeNode, RelabelType::relabelformat, RelabelType::resultcollid, RelabelType::resulttype, and RelabelType::resulttypmod.
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_Expr::kind, A_Expr::lexpr, list_make1, A_Expr::location, makeNode, makeString(), A_Expr::name, and A_Expr::rexpr.
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 238 of file makefuncs.c.
References TargetEntry::expr, InvalidOid, makeNode, TargetEntry::resjunk, TargetEntry::resname, TargetEntry::resno, TargetEntry::resorigcol, TargetEntry::resorigtbl, and TargetEntry::ressortgroupref.
Referenced by add_to_flat_tlist(), adjust_partition_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_targetlist(), expandNSItemAttrs(), ExpandRowReference(), foreign_grouping_ok(), generate_append_tlist(), generate_setop_tlist(), make_tlist_from_pathtarget(), postgresAddForeignUpdateTargets(), prepare_sort_from_pathkeys(), preprocess_targetlist(), pull_up_constant_function(), pull_up_simple_values(), rebuild_fdw_scan_tlist(), rewriteSearchAndCycle(), rewriteTargetListIU(), rewriteTargetListUD(), transformAggregateCall(), transformInsertStmt(), transformMultiAssignRef(), transformSetOperationStmt(), transformSetOperationTree(), and transformTargetEntry().
TypeName* makeTypeName | ( | char * | typnam | ) |
Definition at line 444 of file makefuncs.c.
References list_make1, makeString(), and makeTypeNameFromNameList().
Referenced by plpgsql_parse_wordrowtype(), and plpgsql_parse_wordtype().
Definition at line 456 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 472 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 809 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 | ( | Index | 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::varattnosyn, Var::varcollid, Var::varlevelsup, Var::varno, Var::varnosyn, Var::vartype, and Var::vartypmod.
Referenced by ATPrepAlterColumnType(), build_index_tlist(), build_physical_tlist(), build_remote_returning(), BuildOnConflictExcludedTargetlist(), buildVarFromNSColumn(), eval_const_expressions_mutator(), expand_inherited_rtentry(), expand_targetlist(), 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(), rewriteTargetListIU(), rewriteTargetListUD(), scanNSItemForColumn(), set_baserel_partition_key_exprs(), set_dummy_tlist_references(), transformAssignedExpr(), and transformSetOperationStmt().
Var* makeVarFromTargetEntry | ( | Index | varno, |
TargetEntry * | tle | ||
) |
Definition at line 103 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_sortgroupref(), and transformInsertStmt().
Var* makeWholeRowVar | ( | RangeTblEntry * | rte, |
Index | varno, | ||
Index | varlevelsup, | ||
bool | allowScalar | ||
) |
Definition at line 133 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(), rewriteTargetListUD(), and transformWholeRowRef().