On Thu, Dec 03, 2020 at 08:46:09PM +0100, Peter Eisentraut wrote: > There are a couple of more places like this, including the existing > ClusterOption that this patched moved around, but we should be removing > those. > > My reasoning is that if you look at an enum value of this type, either say > in a switch statement or a debugger, the enum value might not be any of the > defined symbols. So that way you lose all the type checking that an enum > might give you.
VacuumOption does that since 6776142, and ClusterOption since 9ebe057, so switching ReindexOption to just match the two others still looks like the most consistent move. Please note that there is more than that, like ScanOptions, relopt_kind, RVROption, InstrumentOption, TableLikeOption. I would not mind changing that, though I am not sure that this improves readability. And if we'd do it, it may make sense to extend that even more to the places where it would apply like the places mentioned one paragraph above. -- Michael
signature.asc
Description: PGP signature