|
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, fb(), format_type_with_typemod(), get_collation_name(), i, NameStr, 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, copyObject, DefineVirtualRelation(), elog, ereport, errcode(), errdetail(), errhint(), errmsg(), ERROR, fb(), 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, stmt, strVal, and view_query_is_auto_updatable().
Referenced by ProcessUtilitySlow().
Definition at line 331 of file view.c.
References CMD_SELECT, DefineQueryRewrite(), fb(), 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, DefineRelation(), ereport, errcode(), errhint(), errmsg(), ERROR, exprCollation(), exprType(), exprTypmod(), fb(), 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, CreateStmt::options, RangeVarGetAndCheckCreationNamespace(), RelationData::rd_att, RelationData::rd_rel, recordDependencyOnCurrentExtension(), CreateStmt::relation, relation_close(), relation_open(), RelationGetRelationName, RangeVar::relpersistence, skip, StoreViewQuery(), CreateStmt::tableElts, CreateStmt::tablespacename, and type_is_collatable().
Referenced by DefineView().
Definition at line 513 of file view.c.
References DefineViewRules(), and fb().
Referenced by create_ctas_internal(), and DefineVirtualRelation().