diff options
| author | Robert Haas | 2010-12-29 11:48:53 +0000 |
|---|---|---|
| committer | Robert Haas | 2010-12-29 11:48:53 +0000 |
| commit | 53dbc27c62d8e1b6c5253feba04a5094cb8fe046 (patch) | |
| tree | b27563b69fa73dc4b7dc873bfc653bedc6ba1e05 /src/backend/parser | |
| parent | 9b8aff8c192e2f313f90395d114c58a9ef84f97f (diff) | |
Support unlogged tables.
The contents of an unlogged table are WAL-logged; thus, they are not
available on standby servers and are truncated whenever the database
system enters recovery. Indexes on unlogged tables are also unlogged.
Unlogged GiST indexes are not currently supported.
Diffstat (limited to 'src/backend/parser')
| -rw-r--r-- | src/backend/parser/gram.y | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 37840baa0f6..26a5e84d44a 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -538,8 +538,8 @@ static RangeVar *makeRangeVarFromAnyName(List *names, int position, core_yyscan_ TO TRAILING TRANSACTION TREAT TRIGGER TRIM TRUE_P TRUNCATE TRUSTED TYPE_P - UNBOUNDED UNCOMMITTED UNENCRYPTED UNION UNIQUE UNKNOWN UNLISTEN UNTIL - UPDATE USER USING + UNBOUNDED UNCOMMITTED UNENCRYPTED UNION UNIQUE UNKNOWN UNLISTEN UNLOGGED + UNTIL UPDATE USER USING VACUUM VALID VALIDATOR VALUE_P VALUES VARCHAR VARIADIC VARYING VERBOSE VERSION_P VIEW VOLATILE @@ -2365,6 +2365,7 @@ OptTemp: TEMPORARY { $$ = RELPERSISTENCE_TEMP; } | LOCAL TEMP { $$ = RELPERSISTENCE_TEMP; } | GLOBAL TEMPORARY { $$ = RELPERSISTENCE_TEMP; } | GLOBAL TEMP { $$ = RELPERSISTENCE_TEMP; } + | UNLOGGED { $$ = RELPERSISTENCE_UNLOGGED; } | /*EMPTY*/ { $$ = RELPERSISTENCE_PERMANENT; } ; @@ -7927,6 +7928,11 @@ OptTempTableName: $$ = $4; $$->relpersistence = RELPERSISTENCE_TEMP; } + | UNLOGGED opt_table qualified_name + { + $$ = $3; + $$->relpersistence = RELPERSISTENCE_UNLOGGED; + } | TABLE qualified_name { $$ = $2; @@ -11395,6 +11401,7 @@ unreserved_keyword: | UNENCRYPTED | UNKNOWN | UNLISTEN + | UNLOGGED | UNTIL | UPDATE | VACUUM |
