diff options
Diffstat (limited to 'src/backend/parser/gram.y')
-rw-r--r-- | src/backend/parser/gram.y | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 21b7498341..145e4aac5d 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.652 2009/01/07 22:54:45 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.653 2009/01/12 08:54:26 petere Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -284,6 +284,7 @@ static TypeName *TableFuncTypeName(List *columns); execute_param_clause using_clause returning_clause enum_val_list table_func_column_list create_generic_options alter_generic_options + relation_expr_list %type <range> OptTempTableName %type <into> into_clause create_as_target @@ -3794,7 +3795,7 @@ attrs: '.' attr_name *****************************************************************************/ TruncateStmt: - TRUNCATE opt_table qualified_name_list opt_restart_seqs opt_drop_behavior + TRUNCATE opt_table relation_expr_list opt_restart_seqs opt_drop_behavior { TruncateStmt *n = makeNode(TruncateStmt); n->relations = $3; @@ -6558,7 +6559,15 @@ using_clause: | /*EMPTY*/ { $$ = NIL; } ; -LockStmt: LOCK_P opt_table qualified_name_list opt_lock opt_nowait + +/***************************************************************************** + * + * QUERY: + * LOCK TABLE + * + *****************************************************************************/ + +LockStmt: LOCK_P opt_table relation_expr_list opt_lock opt_nowait { LockStmt *n = makeNode(LockStmt); @@ -7487,6 +7496,12 @@ relation_expr: ; +relation_expr_list: + relation_expr { $$ = list_make1($1); } + | relation_expr_list ',' relation_expr { $$ = lappend($1, $3); } + ; + + /* * Given "UPDATE foo set set ...", we have to decide without looking any * further ahead whether the first "set" is an alias or the UPDATE's SET |