Missing break statement after transformCallStmt in transformStmt

Started by Ashutosh Bapatover 8 years ago2 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

never appliedsuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t38335
psql -h localhost -U postgres

Built from patchset v1 (message #1), July 28, 2026 at 02:04 PM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t38335_1 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t38335_1 && git checkout t38335_1

Patchset v1 (message #1) is on t38335_1

Jump to latest
#1Ashutosh Bapat
ashutosh.bapat.oss@gmail.com

HI,
Commit 76b6aa41f41db66004b1c430f17a546d4102fbe7 a new case for
CallStmt in transformStmt but forgot to add a break statement at the
end of the case. This doesn't create any problems since the default
case to which it continues without break doesn't change the result.
But this is going to cause problems in future when somebody adds a
case after CallStmt.

Here's patch with fix.
--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

Attachments:

t38335_1
pg_call_break.patchtext/x-patch; charset=US-ASCII; name=pg_call_break.patchDownload+1-0
#2Michael Paquier
michael@paquier.xyz
In reply to: Ashutosh Bapat (#1)
Re: Missing break statement after transformCallStmt in transformStmt

On Wed, Mar 07, 2018 at 11:30:53AM +0530, Ashutosh Bapat wrote:

Commit 76b6aa41f41db66004b1c430f17a546d4102fbe7 a new case for
CallStmt in transformStmt but forgot to add a break statement at the
end of the case. This doesn't create any problems since the default
case to which it continues without break doesn't change the result.
But this is going to cause problems in future when somebody adds a
case after CallStmt.

Indeed, this code is quite lucky to be able to run, and I can see that
the code path is stressed. What surprises me the most is that Coverity
did not complain about that, but wait... They are in maintenance mode
since the 20th of February:
https://twitter.com/CoverityScan/status/966068113941979136
--
Michael