Definition at line 361 of file view.c.
387 elog(
ERROR,
"unexpected parse analysis result");
391 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
392 errmsg(
"views must not contain SELECT INTO")));
394 elog(
ERROR,
"unexpected parse analysis result");
401 if (viewParse->hasModifyingCTE)
403 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
404 errmsg(
"views must not contain data-modifying statements in WITH")));
423 check_option =
false;
429 if (strcmp(defel->
defname,
"check_option") == 0)
439 const char *view_updatable_error =
442 if (view_updatable_error)
444 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
445 errmsg(
"WITH CHECK OPTION is supported only on automatically updatable views"),
446 errhint(
"%s",
_(view_updatable_error))));
467 if (alist_item == NULL)
471 if (alist_item != NULL)
473 (
errcode(ERRCODE_SYNTAX_ERROR),
474 errmsg(
"CREATE VIEW specifies more column "
475 "names than columns")));
481 (
errcode(ERRCODE_SYNTAX_ERROR),
482 errmsg(
"views cannot be unlogged because they do not have storage")));
496 (
errmsg(
"view \"%s\" will be a temporary view",
elog(ERROR, "%s: %s", p2, msg)
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
List * lappend(List *list, void *datum)
DefElem * makeDefElem(char *name, Node *arg, int location)
char * pstrdup(const char *in)
#define IsA(nodeptr, _type_)
bool isQueryUsingTempRelation(Query *query)
Query * parse_analyze_fixedparams(RawStmt *parseTree, const char *sourceText, const Oid *paramTypes, int numParams, QueryEnvironment *queryEnv)
#define lfirst_node(type, lc)
static ListCell * list_head(const List *l)
static ListCell * lnext(const List *l, const ListCell *c)
const char * view_query_is_auto_updatable(Query *viewquery, bool check_cols)
ViewCheckOption withCheckOption
String * makeString(char *str)
static ObjectAddress DefineVirtualRelation(RangeVar *relation, List *tlist, bool replace, List *options, Query *viewParse)
References _, ViewStmt::aliases, CASCADED_CHECK_OPTION, CMD_SELECT, Query::commandType, copyObject, DefineVirtualRelation(), DefElem::defname, elog(), ereport, errcode(), errhint(), errmsg(), ERROR, IsA, isQueryUsingTempRelation(), lappend(), lfirst, lfirst_node, list_head(), lnext(), LOCAL_CHECK_OPTION, makeDefElem(), makeNode, makeString(), NIL, NOTICE, ViewStmt::options, parse_analyze_fixedparams(), pstrdup(), ViewStmt::query, RangeVar::relname, RangeVar::relpersistence, ViewStmt::replace, RawStmt::stmt, RawStmt::stmt_len, RawStmt::stmt_location, strVal, Query::targetList, Query::utilityStmt, ViewStmt::view, view_query_is_auto_updatable(), and ViewStmt::withCheckOption.
Referenced by ProcessUtilitySlow().