mirror of
https://github.com/postgres/postgres.git
synced 2025-08-22 21:53:06 +03:00
Add ONLY support to LOCK and TRUNCATE. By default, these commands are now
recursive. => Note this incompatibility in the release notes.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user