Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0aff929

Browse files
committed
Use grammar symbol function_with_argtypes consistently
Instead of sometimes referring to a function signature like func_name func_args, use the existing function_with_argtypes symbol, which combines the two. Reviewed-by: Alvaro Herrera <alvherre@2ndquadrant.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
1 parent 11003eb commit 0aff929

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

src/backend/parser/gram.y

+22-22
Original file line numberDiff line numberDiff line change
@@ -5414,21 +5414,21 @@ opclass_item:
54145414
n->order_family = $5;
54155415
$$ = (Node *) n;
54165416
}
5417-
| FUNCTION Iconst func_name func_args
5417+
| FUNCTION Iconst function_with_argtypes
54185418
{
54195419
CreateOpClassItem *n = makeNode(CreateOpClassItem);
54205420
n->itemtype = OPCLASS_ITEM_FUNCTION;
5421-
n->name = $3;
5422-
n->args = extractArgTypes($4);
5421+
n->name = $3->funcname;
5422+
n->args = $3->funcargs;
54235423
n->number = $2;
54245424
$$ = (Node *) n;
54255425
}
5426-
| FUNCTION Iconst '(' type_list ')' func_name func_args
5426+
| FUNCTION Iconst '(' type_list ')' function_with_argtypes
54275427
{
54285428
CreateOpClassItem *n = makeNode(CreateOpClassItem);
54295429
n->itemtype = OPCLASS_ITEM_FUNCTION;
5430-
n->name = $6;
5431-
n->args = extractArgTypes($7);
5430+
n->name = $6->funcname;
5431+
n->args = $6->funcargs;
54325432
n->number = $2;
54335433
n->class_args = $4;
54345434
$$ = (Node *) n;
@@ -5828,13 +5828,13 @@ CommentStmt:
58285828
n->comment = $7;
58295829
$$ = (Node *) n;
58305830
}
5831-
| COMMENT ON FUNCTION func_name func_args IS comment_text
5831+
| COMMENT ON FUNCTION function_with_argtypes IS comment_text
58325832
{
58335833
CommentStmt *n = makeNode(CommentStmt);
58345834
n->objtype = OBJECT_FUNCTION;
5835-
n->objname = $4;
5836-
n->objargs = extractArgTypes($5);
5837-
n->comment = $7;
5835+
n->objname = $4->funcname;
5836+
n->objargs = $4->funcargs;
5837+
n->comment = $6;
58385838
$$ = (Node *) n;
58395839
}
58405840
| COMMENT ON OPERATOR any_operator oper_argtypes IS comment_text
@@ -6046,15 +6046,15 @@ SecLabelStmt:
60466046
n->label = $9;
60476047
$$ = (Node *) n;
60486048
}
6049-
| SECURITY LABEL opt_provider ON FUNCTION func_name func_args
6049+
| SECURITY LABEL opt_provider ON FUNCTION function_with_argtypes
60506050
IS security_label
60516051
{
60526052
SecLabelStmt *n = makeNode(SecLabelStmt);
60536053
n->provider = $3;
60546054
n->objtype = OBJECT_FUNCTION;
6055-
n->objname = $6;
6056-
n->objargs = extractArgTypes($7);
6057-
n->label = $9;
6055+
n->objname = $6->funcname;
6056+
n->objargs = $6->funcargs;
6057+
n->label = $8;
60586058
$$ = (Node *) n;
60596059
}
60606060
| SECURITY LABEL opt_provider ON LARGE_P OBJECT_P NumericOnly
@@ -7284,24 +7284,24 @@ opt_restrict:
72847284
*****************************************************************************/
72857285

72867286
RemoveFuncStmt:
7287-
DROP FUNCTION func_name func_args opt_drop_behavior
7287+
DROP FUNCTION function_with_argtypes opt_drop_behavior
72887288
{
72897289
DropStmt *n = makeNode(DropStmt);
72907290
n->removeType = OBJECT_FUNCTION;
7291-
n->objects = list_make1($3);
7292-
n->arguments = list_make1(extractArgTypes($4));
7293-
n->behavior = $5;
7291+
n->objects = list_make1($3->funcname);
7292+
n->arguments = list_make1($3->funcargs);
7293+
n->behavior = $4;
72947294
n->missing_ok = false;
72957295
n->concurrent = false;
72967296
$$ = (Node *)n;
72977297
}
7298-
| DROP FUNCTION IF_P EXISTS func_name func_args opt_drop_behavior
7298+
| DROP FUNCTION IF_P EXISTS function_with_argtypes opt_drop_behavior
72997299
{
73007300
DropStmt *n = makeNode(DropStmt);
73017301
n->removeType = OBJECT_FUNCTION;
7302-
n->objects = list_make1($5);
7303-
n->arguments = list_make1(extractArgTypes($6));
7304-
n->behavior = $7;
7302+
n->objects = list_make1($5->funcname);
7303+
n->arguments = list_make1($5->funcargs);
7304+
n->behavior = $6;
73057305
n->missing_ok = true;
73067306
n->concurrent = false;
73077307
$$ = (Node *)n;

0 commit comments

Comments
 (0)