aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/src/sgml/ref/select_into.sgml12
-rw-r--r--src/backend/commands/sequence.c6
-rw-r--r--src/backend/commands/view.c6
3 files changed, 23 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/select_into.sgml b/doc/src/sgml/ref/select_into.sgml
index 787c106a49d..02266083d4e 100644
--- a/doc/src/sgml/ref/select_into.sgml
+++ b/doc/src/sgml/ref/select_into.sgml
@@ -24,7 +24,7 @@ PostgreSQL documentation
[ WITH [ RECURSIVE ] <replaceable class="parameter">with_query</replaceable> [, ...] ]
SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replaceable> [, ...] ) ] ]
* | <replaceable class="parameter">expression</replaceable> [ [ AS ] <replaceable class="parameter">output_name</replaceable> ] [, ...]
- INTO [ TEMPORARY | TEMP ] [ TABLE ] <replaceable class="parameter">new_table</replaceable>
+ INTO [ TEMPORARY | TEMP | UNLOGGED ] [ TABLE ] <replaceable class="parameter">new_table</replaceable>
[ FROM <replaceable class="parameter">from_item</replaceable> [, ...] ]
[ WHERE <replaceable class="parameter">condition</replaceable> ]
[ GROUP BY <replaceable class="parameter">expression</replaceable> [, ...] ]
@@ -65,6 +65,16 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replac
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><literal>UNLOGGED</literal></term>
+ <listitem>
+ <para>
+ If specified, the table is created as an unlogged table. Refer
+ to <xref linkend="sql-createtable"> for details.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><replaceable class="PARAMETER">new_table</replaceable></term>
<listitem>
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c
index 80ad516de1f..e71c311faf7 100644
--- a/src/backend/commands/sequence.c
+++ b/src/backend/commands/sequence.c
@@ -119,6 +119,12 @@ DefineSequence(CreateSeqStmt *seq)
int i;
NameData name;
+ /* Unlogged sequences are not implemented -- not clear if useful. */
+ if (seq->sequence->relpersistence == RELPERSISTENCE_UNLOGGED)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("unlogged sequences are not supported")));
+
/* Check and set all option values */
init_params(seq->options, true, &new, &owned_by);
diff --git a/src/backend/commands/view.c b/src/backend/commands/view.c
index 22dfc923cf6..1f418e907ea 100644
--- a/src/backend/commands/view.c
+++ b/src/backend/commands/view.c
@@ -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
*