=== Applying patches on top of PostgreSQL commit ID 23cbadeeb4738b8f5e615f0c5a2ef7af6111d512 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Mon Apr 20 11:00:27 UTC 2026 On branch cf/6492 nothing to commit, working tree clean === using 'git am' to apply patch ./0001-Provide-support-for-trailing-commas-where-possible-and-practical.patch === Applying: Provide-support-for-trailing-commas-where-possible-and-practical Using index info to reconstruct a base tree... M src/backend/parser/gram.y Falling back to patching base and 3-way merge... Auto-merging src/backend/parser/gram.y CONFLICT (content): Merge conflict in src/backend/parser/gram.y error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 Provide-support-for-trailing-commas-where-possible-and-practical When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". === using patch(1) to apply patch ./0001-Provide-support-for-trailing-commas-where-possible-and-practical.patch === patching file src/backend/parser/gram.y Hunk #1 FAILED at 321. Hunk #2 succeeded at 339 (offset 2 lines). Hunk #3 succeeded at 358 (offset 2 lines). Hunk #4 succeeded at 371 (offset 2 lines). Hunk #5 succeeded at 384 (offset 2 lines). Hunk #6 succeeded at 408 (offset 2 lines). Hunk #7 FAILED at 423. Hunk #8 succeeded at 539 (offset 3 lines). Hunk #9 succeeded at 570 (offset 5 lines). Hunk #10 FAILED at 621. Hunk #11 succeeded at 646 (offset 6 lines). Hunk #12 succeeded at 656 (offset 6 lines). Hunk #13 succeeded at 681 (offset 6 lines). Hunk #14 FAILED at 894. Hunk #15 succeeded at 945 (offset 39 lines). Hunk #16 succeeded at 1176 (offset 41 lines). Hunk #17 succeeded at 1213 (offset 46 lines). Hunk #18 succeeded at 2440 (offset 49 lines). Hunk #19 succeeded at 3250 (offset 49 lines). Hunk #20 succeeded at 3425 (offset 49 lines). Hunk #21 succeeded at 3454 (offset 49 lines). Hunk #22 succeeded at 3746 (offset 53 lines). Hunk #23 succeeded at 3775 (offset 57 lines). Hunk #24 succeeded at 3968 (offset 57 lines). Hunk #25 succeeded at 4594 (offset 57 lines). Hunk #26 succeeded at 4610 (offset 57 lines). Hunk #27 succeeded at 4637 (offset 57 lines). Hunk #28 succeeded at 4664 (offset 57 lines). Hunk #29 succeeded at 4822 (offset 57 lines). Hunk #30 succeeded at 4947 (offset 57 lines). Hunk #31 succeeded at 5723 (offset 59 lines). Hunk #32 succeeded at 5737 (offset 59 lines). Hunk #33 succeeded at 6334 (offset 59 lines). Hunk #34 succeeded at 6420 (offset 59 lines). Hunk #35 succeeded at 6533 (offset 59 lines). Hunk #36 succeeded at 6758 (offset 59 lines). Hunk #37 succeeded at 6809 (offset 59 lines). Hunk #38 succeeded at 6935 (offset 59 lines). Hunk #39 succeeded at 7045 (offset 59 lines). Hunk #40 succeeded at 7350 (offset 60 lines). Hunk #41 succeeded at 7369 (offset 60 lines). Hunk #42 succeeded at 7998 (offset 60 lines). Hunk #43 succeeded at 8006 (offset 60 lines). Hunk #44 succeeded at 8016 (offset 60 lines). Hunk #45 succeeded at 8067 (offset 60 lines). Hunk #46 succeeded at 8292 (offset 69 lines). Hunk #47 succeeded at 8373 (offset 69 lines). Hunk #48 succeeded at 8581 (offset 69 lines). Hunk #49 succeeded at 8648 (offset 69 lines). Hunk #50 succeeded at 8754 (offset 69 lines). Hunk #51 succeeded at 8825 (offset 69 lines). Hunk #52 succeeded at 9029 (offset 69 lines). Hunk #53 succeeded at 9050 (offset 69 lines). Hunk #54 succeeded at 9227 (offset 69 lines). Hunk #55 succeeded at 9256 (offset 69 lines). Hunk #56 succeeded at 9472 (offset 69 lines). Hunk #57 succeeded at 11099 (offset 463 lines). Hunk #58 succeeded at 11522 with fuzz 2 (offset 473 lines). Hunk #59 succeeded at 11551 with fuzz 2 (offset 479 lines). Hunk #60 succeeded at 12128 (offset 539 lines). Hunk #61 succeeded at 12187 (offset 539 lines). Hunk #62 succeeded at 12206 (offset 539 lines). Hunk #63 succeeded at 12422 (offset 539 lines). Hunk #64 succeeded at 12912 (offset 588 lines). Hunk #65 succeeded at 13195 (offset 588 lines). Hunk #66 succeeded at 13450 (offset 635 lines). Hunk #67 succeeded at 13499 (offset 635 lines). Hunk #68 succeeded at 14005 (offset 635 lines). Hunk #69 succeeded at 14031 (offset 635 lines). Hunk #70 succeeded at 14049 (offset 635 lines). Hunk #71 succeeded at 14073 (offset 635 lines). Hunk #72 succeeded at 14207 (offset 635 lines). Hunk #73 succeeded at 14467 (offset 635 lines). Hunk #74 succeeded at 14604 (offset 640 lines). Hunk #75 succeeded at 14977 (offset 651 lines). Hunk #76 succeeded at 15128 (offset 700 lines). Hunk #77 succeeded at 15172 (offset 700 lines). Hunk #78 succeeded at 15230 (offset 700 lines). Hunk #79 succeeded at 15352 (offset 700 lines). Hunk #80 succeeded at 15413 (offset 700 lines). Hunk #81 succeeded at 16760 (offset 717 lines). Hunk #82 succeeded at 16769 (offset 717 lines). Hunk #83 succeeded at 16788 (offset 717 lines). Hunk #84 FAILED at 16686. Hunk #85 succeeded at 17514 (offset 717 lines). Hunk #86 succeeded at 17759 (offset 717 lines). Hunk #87 succeeded at 17833 (offset 719 lines). Hunk #88 succeeded at 17893 (offset 719 lines). Hunk #89 succeeded at 17915 (offset 719 lines). Hunk #90 succeeded at 18388 (offset 719 lines). Hunk #91 succeeded at 18611 (offset 927 lines). Hunk #92 succeeded at 18666 (offset 927 lines). Hunk #93 succeeded at 18692 (offset 927 lines). Hunk #94 succeeded at 18761 (offset 927 lines). Hunk #95 succeeded at 18918 (offset 927 lines). 5 out of 95 hunks FAILED -- saving rejects to file src/backend/parser/gram.y.rej Unstaged changes after reset: M src/backend/parser/gram.y Removing src/backend/parser/gram.y.rej === using 'git apply' to apply patch ./0001-Provide-support-for-trailing-commas-where-possible-and-practical.patch === Applied patch to 'src/backend/parser/gram.y' with conflicts. U src/backend/parser/gram.y diff --cc src/backend/parser/gram.y index 2d1b19d1f53,02d3a623703..00000000000 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@@ -323,9 -321,10 +323,10 @@@ static Node *makeRecursiveViewSelect(ch simple_select values_clause PLpgSQL_Expr PLAssignStmt + %type opt_trailing_comma %type opt_single_name %type opt_qualified_name -%type opt_concurrently +%type opt_concurrently opt_usingindex %type opt_drop_behavior %type opt_utility_option_list %type opt_wait_with_clause @@@ -450,14 -456,15 +458,21 @@@ prep_type_clause execute_param_clause using_clause returning_with_clause returning_options - opt_enum_val_list enum_val_list table_func_column_list + opt_enum_val_list enum_val_list enum_val_list_items + table_func_column_list table_func_column_list_items create_generic_options alter_generic_options - relation_expr_list dostmt_opt_list - transform_element_list transform_type_list + relation_expr_list relation_expr_list_items dostmt_opt_list + transform_element_list transform_type_list transform_type_list_items TriggerTransitions TriggerReferencing ++<<<<<<< ours + vacuum_relation_list opt_vacuum_relation_list + drop_option_list pub_obj_list pub_all_obj_type_list + pub_except_obj_list opt_pub_except_clause ++======= + vacuum_relation_list vacuum_relation_list_items opt_vacuum_relation_list + drop_option_list drop_option_list_items + pub_obj_list pub_obj_list_items pub_all_obj_type_list pub_all_obj_type_list_items ++>>>>>>> theirs %type returning_clause %type returning_option @@@ -623,8 -628,8 +639,13 @@@ %type opt_provider security_label ++<<<<<<< ours +%type labeled_expr +%type labeled_expr_list xml_attributes ++======= + %type xml_attribute_el + %type xml_attribute_list xml_attribute_list_items xml_attributes ++>>>>>>> theirs %type xml_root_version opt_xml_root_standalone %type xmlexists_argument %type document_or_content @@@ -929,8 -901,11 +950,16 @@@ */ %nonassoc UNBOUNDED NESTED /* ideally would have same precedence as IDENT */ %nonassoc IDENT PARTITION RANGE ROWS GROUPS PRECEDING FOLLOWING CUBE ROLLUP ++<<<<<<< ours + SET KEYS OBJECT_P SCALAR TO USING VALUE_P WITH WITHOUT PATH +%left Op OPERATOR RIGHT_ARROW '|' /* multi-character ops and user-defined operators */ ++======= + SET KEYS OBJECT_P SCALAR VALUE_P WITH WITHOUT PATH + %nonassoc DEFERRED IMMEDIATE SKIP NOWAIT RESTRICT CASCADE REVOKE REPLACE PERIOD GRANTED + %nonassoc RESTART CONTINUE_P + %nonassoc ADMIN CONNECTION INHERIT ENCRYPTED PASSWORD ROLE SYSID UNENCRYPTED VALID + %left Op OPERATOR /* multi-character ops and user-defined operators */ ++>>>>>>> theirs %left '+' '-' %left '*' '/' '%' %left '^' @@@ -11400,19 -11060,18 +11548,23 @@@ PublicationObjSpec } ; - pub_obj_list: PublicationObjSpec - { $$ = list_make1($1); } - | pub_obj_list ',' PublicationObjSpec - { $$ = lappend($1, $3); } - ; + pub_obj_list: + pub_obj_list_items opt_trailing_comma { $$ = $1; } + ; + + pub_obj_list_items: + PublicationObjSpec { $$ = list_make1($1); } + | pub_obj_list_items ',' PublicationObjSpec { $$ = lappend($1, $3); } + ; + +opt_pub_except_clause: + EXCEPT '(' TABLE pub_except_obj_list ')' { $$ = $4; } + | /*EMPTY*/ { $$ = NIL; } + ; + PublicationAllObjSpec: - ALL TABLES + ALL TABLES opt_pub_except_clause { $$ = makeNode(PublicationAllObjSpec); $$->pubobjtype = PUBLICATION_ALL_TABLES; @@@ -11425,31 -11083,17 +11577,34 @@@ $$->pubobjtype = PUBLICATION_ALL_SEQUENCES; $$->location = @1; } - ; + ; - pub_all_obj_type_list: PublicationAllObjSpec - { $$ = list_make1($1); } - | pub_all_obj_type_list ',' PublicationAllObjSpec - { $$ = lappend($1, $3); } - ; + pub_all_obj_type_list: + pub_all_obj_type_list_items opt_trailing_comma { $$ = $1; } + ; + + pub_all_obj_type_list_items: + PublicationAllObjSpec { $$ = list_make1($1); } + | pub_all_obj_type_list_items ',' PublicationAllObjSpec { $$ = lappend($1, $3); } + ; +PublicationExceptObjSpec: + relation_expr + { + $$ = makeNode(PublicationObjSpec); + $$->pubobjtype = PUBLICATIONOBJ_EXCEPT_TABLE; + $$->pubtable = makeNode(PublicationTable); + $$->pubtable->except = true; + $$->pubtable->relation = $1; + $$->location = @1; + } + ; + +pub_except_obj_list: PublicationExceptObjSpec + { $$ = list_make1($1); } + | pub_except_obj_list ',' opt_table PublicationExceptObjSpec + { $$ = lappend($1, $4); } + ; /***************************************************************************** * @@@ -17192,14 -16694,19 +17426,24 @@@ opt_xml_root_standalone: ',' STANDALONE { $$ = makeIntConst(XML_STANDALONE_OMITTED, -1); } ; -xml_attributes: XMLATTRIBUTES '(' xml_attribute_list ')' { $$ = $3; } +xml_attributes: XMLATTRIBUTES '(' labeled_expr_list ')' { $$ = $3; } ; ++<<<<<<< ours +labeled_expr_list: labeled_expr { $$ = list_make1($1); } + | labeled_expr_list ',' labeled_expr { $$ = lappend($1, $3); } ++======= + xml_attribute_list: + xml_attribute_list_items opt_trailing_comma { $$ = $1; } + ; + + xml_attribute_list_items: + xml_attribute_el { $$ = list_make1($1); } + | xml_attribute_list_items ',' xml_attribute_el { $$ = lappend($1, $3); } ++>>>>>>> theirs ; -xml_attribute_el: a_expr AS ColLabel +labeled_expr: a_expr AS ColLabel { $$ = makeNode(ResTarget); $$->name = $3;