|
PostgreSQL Source Code git master
|
#include "parser/parse_node.h"

Go to the source code of this file.
|
extern |
Definition at line 2706 of file parse_relation.c.
References fb(), lappend(), makeNode, ParseState::p_joinlist, and ParseState::p_namespace.
Referenced by addNSItemForReturning(), AddRelationNewConstraints(), AlterPolicy(), CreatePolicy(), CreateTriggerFiringOn(), DefineRelation(), DoCopy(), setTargetTable(), test_rls_hooks_permissive(), test_rls_hooks_restrictive(), transformAlterTableStmt(), transformIndexStmt(), transformInsertStmt(), transformMergeStmt(), transformOnConflictClause(), transformPartitionSpec(), TransformPubWhereClauses(), transformRuleStmt(), transformSetOperationStmt(), transformStatsStmt(), and transformValuesClause().
|
extern |
Definition at line 1483 of file parse_relation.c.
References AccessShareLock, ACL_SELECT, addRTEPermissionInfo(), Alias::aliasname, Assert, buildNSItemFromTupleDesc(), buildRelationAliases(), fb(), isLockedRefname(), lappend(), list_length(), makeAlias(), makeNode, NIL, NoLock, ParseState::p_rtable, ParseState::p_rteperminfos, parserOpenTable(), RelationData::rd_att, RelationData::rd_rel, RelationGetRelid, RangeVar::relname, RowShareLock, RTE_RELATION, and table_close().
Referenced by transformTableEntry().
|
extern |
Definition at line 2328 of file parse_relation.c.
References RangeVar::alias, Alias::aliasname, Assert, buildNSItemFromLists(), CMD_SELECT, Query::commandType, copyObject, CommonTableExpr::ctename, CommonTableExpr::ctequery, ereport, errcode(), errmsg(), ERROR, fb(), i, InvalidOid, IsA, lappend(), lappend_int(), lappend_oid(), lfirst, list_copy(), list_length(), RangeVar::location, makeAlias(), makeNode, makeString(), NIL, ParseState::p_rtable, parser_errposition(), Query::returningList, and RTE_CTE.
Referenced by getNSItemForSpecialRelationTypes().
|
extern |
Definition at line 2480 of file parse_relation.c.
References RangeVar::alias, Alias::aliasname, Assert, buildNSItemFromTupleDesc(), buildRelationAliases(), elog, ENR_NAMED_TUPLESTORE, ENRMetadataGetTupDesc(), ERROR, fb(), get_visible_ENR(), InvalidOid, lappend(), lappend_int(), lappend_oid(), list_length(), makeAlias(), makeNode, TupleDescData::natts, NIL, ParseState::p_rtable, RangeVar::relname, RTE_NAMEDTUPLESTORE, and TupleDescAttr().
Referenced by getNSItemForSpecialRelationTypes().
|
extern |
Definition at line 1747 of file parse_relation.c.
References Alias::aliasname, Assert, buildNSItemFromTupleDesc(), buildRelationAliases(), CheckAttributeNamesTypes(), CHKATYPE_ANYRECORD, chooseScalarFunctionAlias(), ColumnDef::colname, CreateTemplateTupleDesc(), ereport, errcode(), errmsg(), ERROR, exprCollation(), exprLocation(), exprType(), exprTypmod(), fb(), format_type_be(), forthree, RangeTblFunction::funcexpr, funcname, get_expr_result_type(), GetColumnDefCollation(), i, InvalidOid, j, lappend(), lappend_int(), lappend_oid(), lfirst, linitial, list_length(), ColumnDef::location, makeAlias(), makeNode, makeString(), MaxHeapAttributeNumber, MaxTupleAttributeNumber, TupleDescData::natts, NIL, ParseState::p_rtable, palloc_array, parser_errposition(), pstrdup(), RTE_FUNCTION, TypeName::setof, TupleDescCopyEntry(), TupleDescInitEntry(), TupleDescInitEntryCollation(), TYPEFUNC_COMPOSITE, TYPEFUNC_COMPOSITE_DOMAIN, TYPEFUNC_RECORD, TYPEFUNC_SCALAR, ColumnDef::typeName, and typenameTypeIdAndMod().
Referenced by transformRangeFunction().
|
extern |
Definition at line 2579 of file parse_relation.c.
References Assert, buildNSItemFromLists(), copyObject, TargetEntry::expr, exprCollation(), exprType(), exprTypmod(), fb(), lappend(), lappend_int(), lappend_oid(), lfirst, list_length(), makeAlias(), makeNode, makeString(), NIL, ParseState::p_rtable, pstrdup(), and RTE_GROUP.
Referenced by parseCheckAggregates().
|
extern |
Definition at line 2229 of file parse_relation.c.
References Assert, copyObject, ereport, errcode(), errmsg(), ERROR, fb(), InvalidOid, lappend(), list_concat(), list_copy_tail(), list_length(), makeAlias(), makeNode, MaxAttrNumber, NIL, ParseState::p_rtable, palloc_object, RTE_JOIN, and VAR_RETURNING_DEFAULT.
Referenced by transformFromClauseItem(), and transformSetOperationStmt().
|
extern |
Definition at line 1580 of file parse_relation.c.
References AccessShareLock, ACL_SELECT, addRTEPermissionInfo(), Alias::aliasname, Assert, buildNSItemFromTupleDesc(), buildRelationAliases(), CheckRelationLockedByMe(), fb(), lappend(), list_length(), makeAlias(), makeNode, NIL, ParseState::p_rtable, ParseState::p_rteperminfos, RelationData::rd_att, RelationData::rd_rel, RelationGetRelationName, RelationGetRelid, RowExclusiveLock, RowShareLock, and RTE_RELATION.
Referenced by AddRelationNewConstraints(), AlterPolicy(), copy_table(), CreatePolicy(), CreateTriggerFiringOn(), DefineRelation(), DoCopy(), rewriteTargetView(), setTargetTable(), test_rls_hooks_permissive(), test_rls_hooks_restrictive(), transformAlterTableStmt(), transformIndexStmt(), transformOnConflictClause(), transformPartitionSpec(), TransformPubWhereClauses(), transformRuleStmt(), and transformStatsStmt().
|
extern |
Definition at line 1651 of file parse_relation.c.
References Assert, buildNSItemFromLists(), copyObject, ereport, errcode(), errmsg(), ERROR, TargetEntry::expr, exprCollation(), exprType(), exprTypmod(), fb(), lappend(), lappend_int(), lappend_oid(), lfirst, list_length(), makeAlias(), makeNode, makeString(), NIL, ParseState::p_rtable, pstrdup(), TargetEntry::resno, RTE_SUBQUERY, and Query::targetList.
Referenced by convert_ANY_sublink_to_join(), transformInsertStmt(), transformRangeSubselect(), and transformSetOperationTree().
|
extern |
Definition at line 2062 of file parse_relation.c.
References Alias::aliasname, Assert, buildNSItemFromLists(), copyObject, ereport, errcode(), errmsg(), ERROR, exprLocation(), fb(), TableFunc::functype, InvalidOid, lappend(), list_concat(), list_copy_tail(), list_length(), makeAlias(), makeNode, MaxTupleAttributeNumber, NIL, ParseState::p_rtable, parser_errposition(), pstrdup(), RTE_TABLEFUNC, and TFT_XMLTABLE.
Referenced by transformJsonTable(), and transformRangeTableFunc().
|
extern |
Definition at line 2147 of file parse_relation.c.
References Alias::aliasname, Assert, buildNSItemFromLists(), copyObject, ereport, errcode(), errmsg(), ERROR, fb(), InvalidOid, lappend(), linitial, list_length(), makeAlias(), makeNode, makeString(), NIL, ParseState::p_rtable, pstrdup(), RTE_VALUES, and snprintf.
Referenced by transformInsertStmt(), and transformValuesClause().
|
extern |
Definition at line 3929 of file parse_relation.c.
References Assert, fb(), lappend(), list_length(), makeNode, and OidIsValid.
Referenced by add_rte_to_flat_rtable(), addRangeTableEntry(), addRangeTableEntryForRelation(), create_edata_for_relation(), create_estate_for_relation(), plan_cluster_use_sort(), plan_create_index_workers(), and rewriteTargetView().
Definition at line 3585 of file parse_relation.c.
References attname, fb(), i, InvalidAttrNumber, namestrcmp(), RelationGetNumberOfAttributes, specialAttNum(), and TupleDescAttr().
Referenced by checkInsertTargets(), CreateTriggerFiringOn(), do_analyze_rel(), and transformUpdateTargetList().
Definition at line 3635 of file parse_relation.c.
References elog, ERROR, fb(), FormData_pg_attribute, SystemAttributeDefinition(), and TupleDescAttr().
Referenced by transformFkeyGetPrimaryKey().
Definition at line 3677 of file parse_relation.c.
References elog, ERROR, fb(), InvalidOid, and TupleDescAttr().
Referenced by transformFkeyGetPrimaryKey().
Definition at line 3657 of file parse_relation.c.
References elog, ERROR, fb(), FormData_pg_attribute, SystemAttributeDefinition(), and TupleDescAttr().
Referenced by transformAssignedExpr(), and transformFkeyGetPrimaryKey().
|
extern |
Definition at line 438 of file parse_relation.c.
References ereport, errcode(), errmsg(), ERROR, fb(), lfirst, and RTE_RELATION.
Referenced by transformFromClause(), and transformFromClauseItem().
|
extern |
Definition at line 894 of file parse_relation.c.
References check_lateral_ref_ok(), ereport, errcode(), errmsg(), ERROR, fb(), lfirst, ParseState::p_lateral_active, ParseState::p_namespace, ParseState::parentParseState, parser_errposition(), and scanNSItemForColumn().
Referenced by findTargetlistEntrySQL92(), and transformColumnRef().
|
extern |
Definition at line 3767 of file parse_relation.c.
References ereport, errcode(), errdetail(), errhint(), errmsg(), ERROR, fb(), list_nth(), parser_errposition(), relname, rte_visible_if_lateral(), rte_visible_if_qualified(), searchRangeTableForCol(), and strVal.
Referenced by transformColumnRef().
|
extern |
Definition at line 3696 of file parse_relation.c.
References ereport, errcode(), ERRCODE_UNDEFINED_TABLE, errdetail(), errhint(), errmsg(), ERROR, fb(), RangeVar::location, parser_errposition(), refnameNamespaceItem(), RangeVar::relname, rte_visible_if_lateral(), and searchRangeTableForRel().
Referenced by ExpandColumnRefStar(), and transformColumnRef().
|
extern |
Definition at line 3288 of file parse_relation.c.
References ACL_SELECT, Assert, expandNSItemVars(), fb(), forboth, label, lappend(), lfirst, makeTargetEntry(), markVarForSelectPriv(), name, NIL, ParseState::p_next_resno, RTE_RELATION, and strVal.
Referenced by ExpandAllTables(), ExpandSingleTable(), and transformValuesClause().
|
extern |
Definition at line 3223 of file parse_relation.c.
References Assert, fb(), lappend(), lfirst, Var::location, makeVar(), markNullableIfNeeded(), NIL, strVal, and Var::varreturningtype.
Referenced by coerce_record_to_complex(), expandNSItemAttrs(), ExpandSingleTable(), and transformInsertStmt().
|
extern |
Definition at line 2747 of file parse_relation.c.
References Assert, attnum, copyObject, elog, ERROR, expandRelation(), expandTupleDesc(), TargetEntry::expr, exprCollation(), exprType(), exprTypmod(), fb(), forboth, forthree, RangeTblFunction::funcexpr, get_expr_result_type(), InvalidOid, IsA, label, lappend(), lfirst, lfirst_int, lfirst_oid, list_concat(), list_copy_tail(), list_head(), list_length(), list_nth(), list_truncate(), llast, lnext(), makeNullConst(), makeString(), makeVar(), NIL, OidIsValid, pstrdup(), TargetEntry::resno, RTE_CTE, RTE_FUNCTION, RTE_GROUP, RTE_JOIN, RTE_NAMEDTUPLESTORE, RTE_RELATION, RTE_RESULT, RTE_SUBQUERY, RTE_TABLEFUNC, RTE_VALUES, strVal, TYPEFUNC_COMPOSITE, TYPEFUNC_COMPOSITE_DOMAIN, TYPEFUNC_RECORD, and TYPEFUNC_SCALAR.
Referenced by build_physical_tlist(), expandRecordVariable(), ReplaceVarFromTargetList(), set_relation_column_names(), and transformWholeRowRef().
|
extern |
Definition at line 561 of file parse_relation.c.
References Assert, CommonTableExpr::ctename, elog, ERROR, fb(), lfirst, ParseState::p_ctenamespace, ParseState::parentParseState, and RTE_CTE.
Referenced by expandRecordVariable(), and markTargetListOrigin().
|
extern |
Definition at line 514 of file parse_relation.c.
References Assert, elog, ERROR, fb(), lfirst, ParseState::p_namespace, and ParseState::parentParseState.
Referenced by coerce_record_to_complex(), ExpandRowReference(), ParseComplexProjection(), and transformMergeStmt().
|
extern |
Definition at line 541 of file parse_relation.c.
References Assert, fb(), list_length(), ParseState::p_rtable, ParseState::parentParseState, and rt_fetch.
Referenced by count_rowexpr_columns(), expandRecordVariable(), markTargetListOrigin(), and unknown_attribute().
|
extern |
Definition at line 3958 of file parse_relation.c.
References elog, ERROR, fb(), list_length(), and list_nth_node.
Referenced by add_rte_to_flat_rtable(), all_rows_selectable(), build_simple_rel(), ExecCheckPermissions(), expand_inherited_rtentry(), get_rel_all_updated_cols(), get_row_security_policies(), GetResultRTEPermissionInfo(), markQueryForLocking(), markRTEForSelectPriv(), rewriteTargetView(), subquery_planner(), and transformLockingClause().
|
extern |
Definition at line 2662 of file parse_relation.c.
References fb(), lfirst, NIL, ParseState::p_locked_from_parent, and ParseState::p_locking_clause.
Referenced by addRangeTableEntry(), and transformRangeSubselect().
|
extern |
Definition at line 1046 of file parse_relation.c.
References bms_union(), fb(), list_length(), list_nth(), ParseState::p_nullingrels, ParseState::parentParseState, Var::varlevelsup, and Var::varno.
Referenced by buildVarFromNSColumn(), expandNSItemVars(), scanNSItemForColumn(), and transformWholeRowRef().
|
extern |
Definition at line 1161 of file parse_relation.c.
References Assert, fb(), IsA, markRTEForSelectPriv(), ParseState::parentParseState, Var::varattno, Var::varlevelsup, and Var::varno.
Referenced by expandNSItemAttrs(), ExpandSingleTable(), scanNSItemForColumn(), transformJoinUsingClause(), and transformWholeRowRef().
|
extern |
Definition at line 1431 of file parse_relation.c.
References cancel_parser_errposition_callback(), ereport, errcode(), ERRCODE_UNDEFINED_TABLE, errdetail(), errhint(), errmsg(), ERROR, fb(), isFutureCTE(), RangeVar::location, RangeVar::relname, RangeVar::schemaname, setup_parser_errposition_callback(), and table_openrv_extended().
Referenced by addRangeTableEntry(), and setTargetTable().
|
extern |
Definition at line 130 of file parse_relation.c.
References fb(), get_relname_relid(), InvalidOid, LookupNamespaceNoError(), OidIsValid, ParseState::parentParseState, scanNameSpaceForRefname(), and scanNameSpaceForRelid().
Referenced by errorMissingRTE(), ExpandColumnRefStar(), transformColumnRef(), and transformReturningClause().
|
extern |
Definition at line 286 of file parse_relation.c.
References CommonTableExpr::ctename, fb(), lfirst, ParseState::p_ctenamespace, and ParseState::parentParseState.
Referenced by getNSItemForSpecialRelationTypes(), and searchRangeTableForRel().
|
extern |
Definition at line 339 of file parse_relation.c.
References name_matches_visible_ENR().
Referenced by getNSItemForSpecialRelationTypes(), searchRangeTableForRel(), and setTargetTable().
|
extern |
Definition at line 684 of file parse_relation.c.
References attnum, ereport, errcode(), errmsg(), ERROR, EXPR_KIND_CHECK_CONSTRAINT, EXPR_KIND_GENERATED_COLUMN, EXPR_KIND_MERGE_WHEN, fb(), FormData_pg_attribute, InvalidAttrNumber, Var::location, makeVar(), markNullableIfNeeded(), markVarForSelectPriv(), ParseState::p_expr_kind, parser_errposition(), scanRTEForColumn(), SystemAttributeDefinition(), TableOidAttributeNumber, and Var::varreturningtype.
Referenced by colNameToVar(), ParseComplexProjection(), and transformColumnRef().