=== Applying patches on top of PostgreSQL commit ID e5d99b4d9ef4b92fb74f05bf783e06766bb661ee === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Thu Jan 22 05:46:25 UTC 2026 On branch cf/6291 nothing to commit, working tree clean === using 'git am' to apply patch ./v6-0001-tests-Add-a-test-C-extension-module.patch === Applying: tests: Add a test C++ extension module Using index info to reconstruct a base tree... M meson.build M src/test/modules/Makefile M src/test/modules/meson.build Falling back to patching base and 3-way merge... CONFLICT (add/add): Merge conflict in src/test/modules/test_cplusplusext/test_cplusplusext.cpp Auto-merging src/test/modules/test_cplusplusext/test_cplusplusext.cpp CONFLICT (add/add): Merge conflict in src/test/modules/test_cplusplusext/sql/test_cplusplusext.sql Auto-merging src/test/modules/test_cplusplusext/sql/test_cplusplusext.sql CONFLICT (add/add): Merge conflict in src/test/modules/test_cplusplusext/meson.build Auto-merging src/test/modules/test_cplusplusext/meson.build CONFLICT (add/add): Merge conflict in src/test/modules/test_cplusplusext/expected/test_cplusplusext.out Auto-merging src/test/modules/test_cplusplusext/expected/test_cplusplusext.out CONFLICT (add/add): Merge conflict in src/test/modules/test_cplusplusext/README Auto-merging src/test/modules/test_cplusplusext/README Auto-merging src/test/modules/meson.build Auto-merging src/test/modules/Makefile CONFLICT (content): Merge conflict in src/test/modules/Makefile Auto-merging meson.build error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 tests: Add a test C++ extension module 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". Unstaged changes after reset: M doc/src/sgml/xfunc.sgml M meson.build M src/include/fmgr.h M src/test/modules/Makefile M src/test/modules/meson.build M src/test/modules/test_cplusplusext/README M src/test/modules/test_cplusplusext/expected/test_cplusplusext.out M src/test/modules/test_cplusplusext/meson.build M src/test/modules/test_cplusplusext/sql/test_cplusplusext.sql M src/test/modules/test_cplusplusext/test_cplusplusext.cpp === using patch(1) to apply patch ./v6-0001-tests-Add-a-test-C-extension-module.patch === patching file doc/src/sgml/xfunc.sgml patching file meson.build patching file src/include/fmgr.h patching file src/test/modules/Makefile Hunk #1 succeeded at 81 with fuzz 1 (offset 6 lines). patching file src/test/modules/meson.build Hunk #1 succeeded at 19 with fuzz 1. The next patch would create the file src/test/modules/test_cplusplusext/.gitignore, which already exists! Skipping patch. 1 out of 1 hunk ignored The next patch would create the file src/test/modules/test_cplusplusext/Makefile, which already exists! Skipping patch. 1 out of 1 hunk ignored The next patch would create the file src/test/modules/test_cplusplusext/README, which already exists! Skipping patch. 1 out of 1 hunk ignored The next patch would create the file src/test/modules/test_cplusplusext/expected/test_cplusplusext.out, which already exists! Skipping patch. 1 out of 1 hunk ignored The next patch would create the file src/test/modules/test_cplusplusext/meson.build, which already exists! Skipping patch. 1 out of 1 hunk ignored The next patch would create the file src/test/modules/test_cplusplusext/sql/test_cplusplusext.sql, which already exists! Skipping patch. 1 out of 1 hunk ignored The next patch would create the file src/test/modules/test_cplusplusext/test_cplusplusext--1.0.sql, which already exists! Skipping patch. 1 out of 1 hunk ignored The next patch would create the file src/test/modules/test_cplusplusext/test_cplusplusext.control, which already exists! Skipping patch. 1 out of 1 hunk ignored The next patch would create the file src/test/modules/test_cplusplusext/test_cplusplusext.cpp, which already exists! Skipping patch. 1 out of 1 hunk ignored Unstaged changes after reset: M doc/src/sgml/xfunc.sgml M meson.build M src/include/fmgr.h M src/test/modules/Makefile M src/test/modules/meson.build === using 'git apply' to apply patch ./v6-0001-tests-Add-a-test-C-extension-module.patch === Applied patch to 'doc/src/sgml/xfunc.sgml' cleanly. Applied patch to 'meson.build' cleanly. Applied patch to 'src/include/fmgr.h' cleanly. Applied patch to 'src/test/modules/Makefile' with conflicts. Applied patch to 'src/test/modules/meson.build' cleanly. Performing three-way merge... Applied patch to 'src/test/modules/test_cplusplusext/.gitignore' cleanly. Performing three-way merge... Applied patch to 'src/test/modules/test_cplusplusext/Makefile' cleanly. Performing three-way merge... Applied patch to 'src/test/modules/test_cplusplusext/README' with conflicts. Performing three-way merge... Applied patch to 'src/test/modules/test_cplusplusext/expected/test_cplusplusext.out' with conflicts. Performing three-way merge... Applied patch to 'src/test/modules/test_cplusplusext/meson.build' with conflicts. Performing three-way merge... Applied patch to 'src/test/modules/test_cplusplusext/sql/test_cplusplusext.sql' with conflicts. Performing three-way merge... Applied patch to 'src/test/modules/test_cplusplusext/test_cplusplusext--1.0.sql' cleanly. Performing three-way merge... Applied patch to 'src/test/modules/test_cplusplusext/test_cplusplusext.control' cleanly. Performing three-way merge... Applied patch to 'src/test/modules/test_cplusplusext/test_cplusplusext.cpp' with conflicts. U src/test/modules/Makefile U src/test/modules/test_cplusplusext/README U src/test/modules/test_cplusplusext/expected/test_cplusplusext.out U src/test/modules/test_cplusplusext/meson.build U src/test/modules/test_cplusplusext/sql/test_cplusplusext.sql U src/test/modules/test_cplusplusext/test_cplusplusext.cpp diff --cc src/test/modules/Makefile index 44c7163c1cd,c90b1bd0dc0..00000000000 --- a/src/test/modules/Makefile +++ b/src/test/modules/Makefile @@@ -75,7 -75,12 +75,16 @@@ els ALWAYS_SUBDIRS += ldap_password_func endif ++<<<<<<< ours +ifeq ($(have_cxx),yes) ++======= + # test_cplusplusext requires a working C++ compiler. If CXX is set to g++, then + # that could be because g++ is AC_PROG_CXX's fallback when no C++ compiler is + # found. So in that case we do check to see if it actually exists. + ifneq ($(CXX),g++) + SUBDIRS += test_cplusplusext + else ifneq ($(shell command -v $(CXX)),) ++>>>>>>> theirs SUBDIRS += test_cplusplusext else ALWAYS_SUBDIRS += test_cplusplusext diff --cc src/test/modules/test_cplusplusext/README index 8e4090edf01,c7a54fe8e7f..00000000000 --- a/src/test/modules/test_cplusplusext/README +++ b/src/test/modules/test_cplusplusext/README @@@ -1,10 -1,10 +1,20 @@@ test_cplusplusext - Test C++ Extension Compatibility ==================================================== ++<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ours +This test module verifies that PostgreSQL headers and macros work +correctly when compiled with a C++ compiler. + +While PostgreSQL already tests that headers are syntactically valid +C++ using headerscheck, the macros defined in those headers might +still expand to invalid C++ code. This module catches such issues by +actually compiling and running an extension that's written in C++. ++================================================ + This test module verifies that PostgreSQL headers and macros work correctly + when compiled with a C++ compiler. + + While PostgreSQL already tests that headers are syntactically valid C++ using + headerscheck, the macros defined in those headers might still expand to invalid + C++ code. This module catches such issues by actually compiling and running an + extension that's written in C++. ++>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> theirs diff --cc src/test/modules/test_cplusplusext/expected/test_cplusplusext.out index ab0b04b5c5e,25600cfd1b4..00000000000 --- a/src/test/modules/test_cplusplusext/expected/test_cplusplusext.out +++ b/src/test/modules/test_cplusplusext/expected/test_cplusplusext.out @@@ -5,3 -5,10 +5,13 @@@ SELECT test_cplusplus_add(1, 2) 3 (1 row) ++<<<<<<< ours ++======= + SELECT module_name, version FROM pg_get_loaded_modules() + WHERE module_name = 'test_cplusplusext'; + module_name | version + -------------------+--------- + test_cplusplusext | 1.2 + (1 row) + ++>>>>>>> theirs diff --cc src/test/modules/test_cplusplusext/meson.build index d13210ca593,0ddb67978ef..00000000000 --- a/src/test/modules/test_cplusplusext/meson.build +++ b/src/test/modules/test_cplusplusext/meson.build @@@ -1,11 -1,6 +1,15 @@@ # Copyright (c) 2025-2026, PostgreSQL Global Development Group ++<<<<<<< ours +if not have_cxx + subdir_done() +endif + +# Currently not supported, to be fixed. +if cc.get_id() == 'msvc' ++======= + if not add_languages('cpp', required: false, native: false) ++>>>>>>> theirs subdir_done() endif diff --cc src/test/modules/test_cplusplusext/sql/test_cplusplusext.sql index a41682417ae,693910ba637..00000000000 --- a/src/test/modules/test_cplusplusext/sql/test_cplusplusext.sql +++ b/src/test/modules/test_cplusplusext/sql/test_cplusplusext.sql @@@ -1,3 -1,6 +1,9 @@@ CREATE EXTENSION test_cplusplusext; SELECT test_cplusplus_add(1, 2); ++<<<<<<< ours ++======= + + SELECT module_name, version FROM pg_get_loaded_modules() + WHERE module_name = 'test_cplusplusext'; ++>>>>>>> theirs diff --cc src/test/modules/test_cplusplusext/test_cplusplusext.cpp index 435937c00d2,7108e5b1cc5..00000000000 --- a/src/test/modules/test_cplusplusext/test_cplusplusext.cpp +++ b/src/test/modules/test_cplusplusext/test_cplusplusext.cpp @@@ -18,7 -18,7 +18,11 @@@ extern "C" #include "postgres.h" #include "fmgr.h" ++<<<<<<< ours +PG_MODULE_MAGIC; ++======= + PG_MODULE_MAGIC_EXT("test_cplusplusext", "1.2"); ++>>>>>>> theirs PG_FUNCTION_INFO_V1(test_cplusplus_add); }