From 2f2c9d836373ed7f4c017a9d953264f33cc03e3e Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 23 Feb 2026 07:37:50 +0100 Subject: [PATCH] test_cplusplusext: Add C++ pg_fallthrough test case Discussion: https://www.postgresql.org/message-id/flat/76a8efcd-925a-4eaf-bdd1-d972cd1a32ff%40eisentraut.org --- .../modules/test_cplusplusext/test_cplusplusext.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/modules/test_cplusplusext/test_cplusplusext.cpp b/src/test/modules/test_cplusplusext/test_cplusplusext.cpp index 8c2eabcca43..eb129dd15d4 100644 --- a/src/test/modules/test_cplusplusext/test_cplusplusext.cpp +++ b/src/test/modules/test_cplusplusext/test_cplusplusext.cpp @@ -55,5 +55,15 @@ test_cplusplus_add(PG_FUNCTION_ARGS) list_free(list); pfree(node); + switch (a) + { + case 1: + elog(DEBUG1, "1"); + pg_fallthrough; + case 2: + elog(DEBUG1, "2"); + break; + } + PG_RETURN_INT32(a + b); }