aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2012-06-10 08:41:01 +0100
committerSimon Riggs <simon@2ndQuadrant.com>2012-06-10 08:41:01 +0100
commit28ac7972873bd314d4837807396fe44571b5cb50 (patch)
treec59d9dc1f32934a6637a62374ba47815c81d9022 /src/backend/parser
parent72335a20156b19be3a53ef686e0b31140c6f38e5 (diff)
downloadpostgresql-28ac7972873bd314d4837807396fe44571b5cb50.tar.gz
postgresql-28ac7972873bd314d4837807396fe44571b5cb50.zip
Revert error message on GLOBAL/LOCAL pending further discussion
Diffstat (limited to 'src/backend/parser')
-rw-r--r--src/backend/parser/gram.y56
1 files changed, 6 insertions, 50 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 107a8051205..9eb1bed58e6 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -2507,43 +2507,15 @@ CreateStmt: CREATE OptTemp TABLE qualified_name '(' OptTableElementList ')'
* Redundancy here is needed to avoid shift/reduce conflicts,
* since TEMP is not a reserved word. See also OptTempTableName.
*
- * NOTE: we don't accept either the GLOBAL or LOCAL options: not yet implemented.
+ * NOTE: we accept both GLOBAL and LOCAL options; since we have no modules
+ * the LOCAL keyword is really meaningless.
*/
OptTemp: TEMPORARY { $$ = RELPERSISTENCE_TEMP; }
| TEMP { $$ = RELPERSISTENCE_TEMP; }
- | LOCAL TEMPORARY
- {
- ereport(ERROR,
- (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("LOCAL TEMPORARY not yet implemented"),
- parser_errposition(@1)));
- $$ = RELPERSISTENCE_TEMP;
- }
- | LOCAL TEMP
- {
- ereport(ERROR,
- (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("LOCAL TEMPORARY not yet implemented"),
- parser_errposition(@1)));
- $$ = RELPERSISTENCE_TEMP;
- }
- | GLOBAL TEMPORARY
- {
- ereport(ERROR,
- (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("GLOBAL TEMPORARY not yet implemented"),
- parser_errposition(@1)));
- $$ = RELPERSISTENCE_TEMP;
- }
- | GLOBAL TEMP
- {
- ereport(ERROR,
- (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("GLOBAL TEMPORARY not yet implemented"),
- parser_errposition(@1)));
- $$ = RELPERSISTENCE_TEMP;
- }
-
+ | LOCAL TEMPORARY { $$ = RELPERSISTENCE_TEMP; }
+ | LOCAL TEMP { $$ = RELPERSISTENCE_TEMP; }
+ | GLOBAL TEMPORARY { $$ = RELPERSISTENCE_TEMP; }
+ | GLOBAL TEMP { $$ = RELPERSISTENCE_TEMP; }
| UNLOGGED { $$ = RELPERSISTENCE_UNLOGGED; }
| /*EMPTY*/ { $$ = RELPERSISTENCE_PERMANENT; }
;
@@ -8949,37 +8921,21 @@ OptTempTableName:
| LOCAL TEMPORARY opt_table qualified_name
{
$$ = $4;
- ereport(ERROR,
- (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("LOCAL TEMPORARY not yet implemented"),
- parser_errposition(@1)));
$$->relpersistence = RELPERSISTENCE_TEMP;
}
| LOCAL TEMP opt_table qualified_name
{
$$ = $4;
- ereport(ERROR,
- (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("LOCAL TEMPORARY not yet implemented"),
- parser_errposition(@1)));
$$->relpersistence = RELPERSISTENCE_TEMP;
}
| GLOBAL TEMPORARY opt_table qualified_name
{
$$ = $4;
- ereport(ERROR,
- (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("GLOBAL TEMPORARY not yet implemented"),
- parser_errposition(@1)));
$$->relpersistence = RELPERSISTENCE_TEMP;
}
| GLOBAL TEMP opt_table qualified_name
{
$$ = $4;
- ereport(ERROR,
- (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("GLOBAL TEMPORARY not yet implemented"),
- parser_errposition(@1)));
$$->relpersistence = RELPERSISTENCE_TEMP;
}
| UNLOGGED opt_table qualified_name