Re: remove some STATUS_* symbols
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-01-16T12:56:38Z
Lists: pgsql-hackers
On Thu, Jan 16, 2020 at 12:50 AM Michael Paquier <michael@paquier.xyz> wrote: > Thanks, that looks fine. I am still not sure whether the second patch > adding an enum via ProcWaitStatus improves the code readability > though, so my take would be to discard it for now. Perhaps others > think differently, I don't know. IMHO, custom enums for each particular case would be a big improvement over supposedly-generic STATUS codes. It makes it clearer which values are possible in each code path, and it comes out nicer in the debugger, too. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Remove STATUS_WAITING
- a513f1dfbf2c 14.0 landed
-
Remove STATUS_FOUND
- c096a804d9dc 13.0 landed