Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1cc9299

Browse files
committed
Small code cleanup for recent UPDATE SET (values) patch.
1 parent6e8596a commit1cc9299

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

‎src/backend/parser/gram.y

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.561 2006/09/02 20:34:47 momjian Exp $
14+
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.562 2006/09/02 20:52:01 momjian Exp $
1515
*
1616
* HISTORY
1717
* AUTHORDATEMAJOR EVENT
@@ -238,7 +238,7 @@ static void doNegateFloat(Value *v);
238238
qualified_name_listany_nameany_name_list
239239
any_operatorexpr_listattrs
240240
target_listupdate_col_listupdate_target_list
241-
update_value_listinsert_column_list
241+
update_value_listset_optinsert_column_list
242242
values_listdef_listindirectionopt_indirection
243243
group_clauseTriggerFuncArgsselect_limit
244244
opt_select_limitopclass_item_list
@@ -5526,21 +5526,7 @@ opt_nowait:NOWAIT{ $$ = TRUE; }
55265526
*****************************************************************************/
55275527

55285528
UpdateStmt: UPDATE relation_expr_opt_alias
5529-
SET update_target_list
5530-
from_clause
5531-
where_clause
5532-
returning_clause
5533-
{
5534-
UpdateStmt *n = makeNode(UpdateStmt);
5535-
n->relation =$2;
5536-
n->targetList =$4;
5537-
n->fromClause =$5;
5538-
n->whereClause =$6;
5539-
n->returningList =$7;
5540-
$$ = (Node *)n;
5541-
}
5542-
| UPDATE relation_expr_opt_alias
5543-
SET update_target_lists_list
5529+
SET set_opt
55445530
from_clause
55455531
where_clause
55465532
returning_clause
@@ -5555,6 +5541,11 @@ UpdateStmt: UPDATE relation_expr_opt_alias
55555541
}
55565542
;
55575543

5544+
set_opt:
5545+
update_target_list{$$ =$1; }
5546+
| update_target_lists_list{$$ =$1; }
5547+
;
5548+
55585549

55595550
/*****************************************************************************
55605551
*
@@ -5981,7 +5972,7 @@ update_target_lists_el:
59815972
{
59825973
/* merge update_value_list with update_col_list*/
59835974
ResTarget *res_col = (ResTarget *) lfirst(col_cell);
5984-
ResTarget *res_val = (ResTarget *) lfirst(val_cell);
5975+
Node *res_val = (Node *) lfirst(val_cell);
59855976

59865977
res_col->val = (Node *)copyObject(res_val);
59875978
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp