Attached version 7, with some renaming and rewording of comments.
(I also pgindented. Some things are not pretty because of lack of
typedefs.list patching ... a minor issue at worst.)
I'm still not satisfied with the way the builtin enum tables are passed.
Can we settle for using add_enum_reloption instead at initialization
time? Maybe that would be less ugly. Alternatively, we can have
another member in relopt_enum which is a function pointer that returns
the array of relopt_enum_elt_def. Not sure at which point to call that
function, though.
I think it would be great to have a new enum option in, say,
contrib/bloom, to make sure the add_enum_reloption stuff works
correctly. If there's nothing obvious to add there, let's add something
to src/test/modules.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services