mirror of
https://github.com/postgres/postgres.git
synced 2025-06-20 15:22:23 +03:00
Fix a couple of unlogged tables goofs.
"SELECT ... INTO UNLOGGED tabname" works, but wasn't documented; CREATE UNLOGGED SEQUENCE and CREATE UNLOGGED VIEW failed an assertion, instead of throwing a sensible error. Latter issue reported by Itagaki Takahiro; patch review by Tom Lane.
This commit is contained in:
@ -465,6 +465,12 @@ DefineView(ViewStmt *stmt, const char *queryString)
|
||||
view->relname)));
|
||||
}
|
||||
|
||||
/* Unlogged views are not sensible. */
|
||||
if (view->relpersistence == RELPERSISTENCE_UNLOGGED)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
errmsg("views cannot be unlogged because they do not have storage")));
|
||||
|
||||
/*
|
||||
* Create the view relation
|
||||
*
|
||||
|
Reference in New Issue
Block a user