|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/relation.h"#include "access/xact.h"#include "catalog/namespace.h"#include "commands/tablecmds.h"#include "commands/view.h"#include "nodes/makefuncs.h"#include "nodes/nodeFuncs.h"#include "parser/analyze.h"#include "rewrite/rewriteDefine.h"#include "rewrite/rewriteHandler.h"#include "rewrite/rewriteSupport.h"#include "utils/builtins.h"#include "utils/lsyscache.h"#include "utils/rel.h"
Go to the source code of this file.
Functions | |
| static void | checkViewColumns (TupleDesc newdesc, TupleDesc olddesc) |
| static ObjectAddress | DefineVirtualRelation (RangeVar *relation, List *tlist, bool replace, List *options, Query *viewParse) |
| static void | DefineViewRules (Oid viewOid, Query *viewParse, bool replace) |
| ObjectAddress | DefineView (ViewStmt *stmt, const char *queryString, int stmt_location, int stmt_len) |
| void | StoreViewQuery (Oid viewOid, Query *viewParse, bool replace) |
Definition at line 266 of file view.c.
References ereport, errcode(), errhint(), errmsg(), ERROR, format_type_with_typemod(), get_collation_name(), i, NameStr, TupleDescData::natts, and TupleDescAttr().
Referenced by DefineVirtualRelation().
| ObjectAddress DefineView | ( | ViewStmt * | stmt, |
| const char * | queryString, | ||
| int | stmt_location, | ||
| int | stmt_len | ||
| ) |
Definition at line 355 of file view.c.
References _, CASCADED_CHECK_OPTION, CMD_SELECT, Query::commandType, copyObject, DefineVirtualRelation(), DefElem::defname, elog, ereport, errcode(), errdetail(), errhint(), errmsg(), ERROR, getObjectDescription(), IsA, lappend(), lfirst, lfirst_node, list_head(), lnext(), LOCAL_CHECK_OPTION, makeDefElem(), makeNode, makeString(), NIL, NOTICE, parse_analyze_fixedparams(), pstrdup(), query_uses_temp_object(), RangeVar::relname, RangeVar::relpersistence, RawStmt::stmt, stmt, RawStmt::stmt_len, RawStmt::stmt_location, strVal, Query::targetList, Query::utilityStmt, and view_query_is_auto_updatable().
Referenced by ProcessUtilitySlow().
Definition at line 331 of file view.c.
References CMD_SELECT, DefineQueryRewrite(), list_make1, pstrdup(), and ViewSelectRuleName.
Referenced by StoreViewQuery().
|
static |
Definition at line 44 of file view.c.
References AccessExclusiveLock, AlterTableInternal(), Assert(), AT_AddColumnToView, AT_ReplaceRelOptions, BuildDescForRelation(), CheckTableNotInUse(), checkViewColumns(), ColumnDef::collOid, ColumnDef::colname, CommandCounterIncrement(), CreateStmt::constraints, AlterTableCmd::def, DefineRelation(), ereport, errcode(), errhint(), errmsg(), ERROR, TargetEntry::expr, exprCollation(), exprType(), exprTypmod(), CreateStmt::if_not_exists, CreateStmt::inhRelations, InvalidOid, lappend(), lfirst, list_length(), list_make1, makeColumnDef(), makeNode, TupleDescData::natts, NIL, NoLock, ObjectAddressSet, ObjectAddress::objectId, OidIsValid, CreateStmt::oncommit, ONCOMMIT_NOOP, options, CreateStmt::options, RangeVarGetAndCheckCreationNamespace(), RelationData::rd_att, RelationData::rd_rel, recordDependencyOnCurrentExtension(), CreateStmt::relation, relation_close(), relation_open(), RelationGetRelationName, RangeVar::relpersistence, skip, StoreViewQuery(), AlterTableCmd::subtype, CreateStmt::tableElts, CreateStmt::tablespacename, and type_is_collatable().
Referenced by DefineView().
Definition at line 513 of file view.c.
References DefineViewRules().
Referenced by create_ctas_internal(), and DefineVirtualRelation().