test_cplusplusext: Add C++ pg_fallthrough test case

Discussion: https://www.postgresql.org/message-id/flat/76a8efcd-925a-4eaf-bdd1-d972cd1a32ff%40eisentraut.org
This commit is contained in:
Peter Eisentraut 2026-02-23 07:37:50 +01:00
parent 0284e07599
commit 2f2c9d8363

View file

@ -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);
}