mirror of
https://github.com/postgres/postgres.git
synced 2025-11-15 03:41:20 +03:00
Remove unused assignment in CREATE PUBLICATION grammar.
Commit 96b3784973 extended the grammar for CREATE PUBLICATION to support
the ALL SEQUENCES variant. However, it unnecessarily prepared publication
objects for this variant, which is not required. This was a copy-paste
oversight in that commit.
Additionally, rename pub_obj_type_list to pub_all_obj_type_list to better
reflect its purpose.
Author: Shlok Kyal <shlok.kyal.oss@gmail.com>
Reviewed-by: Vignesh C <vignesh21@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://postgr.es/m/CANhcyEWbjkFvk3mSy5LFs9+0z4K1gDwQeFj7GUjOe+L4vxs4AA@mail.gmail.com
Discussion: https://postgr.es/m/CAA4eK1LC+KJiAkSrpE_NwvNdidw9F2os7GERUeSxSKv71gXysQ@mail.gmail.com
This commit is contained in:
@@ -453,7 +453,7 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
|
|||||||
transform_element_list transform_type_list
|
transform_element_list transform_type_list
|
||||||
TriggerTransitions TriggerReferencing
|
TriggerTransitions TriggerReferencing
|
||||||
vacuum_relation_list opt_vacuum_relation_list
|
vacuum_relation_list opt_vacuum_relation_list
|
||||||
drop_option_list pub_obj_list pub_obj_type_list
|
drop_option_list pub_obj_list pub_all_obj_type_list
|
||||||
|
|
||||||
%type <retclause> returning_clause
|
%type <retclause> returning_clause
|
||||||
%type <node> returning_option
|
%type <node> returning_option
|
||||||
@@ -10731,9 +10731,9 @@ AlterOwnerStmt: ALTER AGGREGATE aggregate_with_argtypes OWNER TO RoleSpec
|
|||||||
*
|
*
|
||||||
* CREATE PUBLICATION name [WITH options]
|
* CREATE PUBLICATION name [WITH options]
|
||||||
*
|
*
|
||||||
* CREATE PUBLICATION FOR ALL pub_obj_type [, ...] [WITH options]
|
* CREATE PUBLICATION FOR ALL pub_all_obj_type [, ...] [WITH options]
|
||||||
*
|
*
|
||||||
* pub_obj_type is one of:
|
* pub_all_obj_type is one of:
|
||||||
*
|
*
|
||||||
* TABLES
|
* TABLES
|
||||||
* SEQUENCES
|
* SEQUENCES
|
||||||
@@ -10756,12 +10756,11 @@ CreatePublicationStmt:
|
|||||||
n->options = $4;
|
n->options = $4;
|
||||||
$$ = (Node *) n;
|
$$ = (Node *) n;
|
||||||
}
|
}
|
||||||
| CREATE PUBLICATION name FOR pub_obj_type_list opt_definition
|
| CREATE PUBLICATION name FOR pub_all_obj_type_list opt_definition
|
||||||
{
|
{
|
||||||
CreatePublicationStmt *n = makeNode(CreatePublicationStmt);
|
CreatePublicationStmt *n = makeNode(CreatePublicationStmt);
|
||||||
|
|
||||||
n->pubname = $3;
|
n->pubname = $3;
|
||||||
n->pubobjects = (List *) $5;
|
|
||||||
preprocess_pub_all_objtype_list($5, &n->for_all_tables,
|
preprocess_pub_all_objtype_list($5, &n->for_all_tables,
|
||||||
&n->for_all_sequences,
|
&n->for_all_sequences,
|
||||||
yyscanner);
|
yyscanner);
|
||||||
@@ -10892,9 +10891,9 @@ PublicationAllObjSpec:
|
|||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
pub_obj_type_list: PublicationAllObjSpec
|
pub_all_obj_type_list: PublicationAllObjSpec
|
||||||
{ $$ = list_make1($1); }
|
{ $$ = list_make1($1); }
|
||||||
| pub_obj_type_list ',' PublicationAllObjSpec
|
| pub_all_obj_type_list ',' PublicationAllObjSpec
|
||||||
{ $$ = lappend($1, $3); }
|
{ $$ = lappend($1, $3); }
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user