File tree 3 files changed +23
-1
lines changed
3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ PostgreSQL documentation
24
24
[ WITH [ RECURSIVE ] <replaceable class="parameter">with_query</replaceable> [, ...] ]
25
25
SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replaceable> [, ...] ) ] ]
26
26
* | <replaceable class="parameter">expression</replaceable> [ [ AS ] <replaceable class="parameter">output_name</replaceable> ] [, ...]
27
- INTO [ TEMPORARY | TEMP ] [ TABLE ] <replaceable class="parameter">new_table</replaceable>
27
+ INTO [ TEMPORARY | TEMP | UNLOGGED ] [ TABLE ] <replaceable class="parameter">new_table</replaceable>
28
28
[ FROM <replaceable class="parameter">from_item</replaceable> [, ...] ]
29
29
[ WHERE <replaceable class="parameter">condition</replaceable> ]
30
30
[ GROUP BY <replaceable class="parameter">expression</replaceable> [, ...] ]
@@ -65,6 +65,16 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replac
65
65
</listitem>
66
66
</varlistentry>
67
67
68
+ <varlistentry>
69
+ <term><literal>UNLOGGED</literal></term>
70
+ <listitem>
71
+ <para>
72
+ If specified, the table is created as an unlogged table. Refer
73
+ to <xref linkend="sql-createtable"> for details.
74
+ </para>
75
+ </listitem>
76
+ </varlistentry>
77
+
68
78
<varlistentry>
69
79
<term><replaceable class="PARAMETER">new_table</replaceable></term>
70
80
<listitem>
Original file line number Diff line number Diff line change @@ -119,6 +119,12 @@ DefineSequence(CreateSeqStmt *seq)
119
119
int i ;
120
120
NameData name ;
121
121
122
+ /* Unlogged sequences are not implemented -- not clear if useful. */
123
+ if (seq -> sequence -> relpersistence == RELPERSISTENCE_UNLOGGED )
124
+ ereport (ERROR ,
125
+ (errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
126
+ errmsg ("unlogged sequences are not supported" )));
127
+
122
128
/* Check and set all option values */
123
129
init_params (seq -> options , true, & new , & owned_by );
124
130
Original file line number Diff line number Diff line change @@ -465,6 +465,12 @@ DefineView(ViewStmt *stmt, const char *queryString)
465
465
view -> relname )));
466
466
}
467
467
468
+ /* Unlogged views are not sensible. */
469
+ if (view -> relpersistence == RELPERSISTENCE_UNLOGGED )
470
+ ereport (ERROR ,
471
+ (errcode (ERRCODE_SYNTAX_ERROR ),
472
+ errmsg ("views cannot be unlogged because they do not have storage" )));
473
+
468
474
/*
469
475
* Create the view relation
470
476
*
You can’t perform that action at this time.
0 commit comments