Simplify the writing of amoptions routines by introducing a convenience
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 12 Jan 2009 21:02:15 +0000 (21:02 +0000)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 12 Jan 2009 21:02:15 +0000 (21:02 +0000)
commitc1a88a2e8590e0915cc735e4f0855105b0dfef19
tree436e416b1eba5899153b08bca6f3bf295693dea0
parent4ceb7fb28d4f88c74c37fcd919d543a0a5136238
Simplify the writing of amoptions routines by introducing a convenience
fillRelOptions routine that stores the parsed values in the struct using a
table-based approach.  Per Tom suggestion.  Also remove the "continue"
in HANDLE_*_RELOPTION macros, which were useless and in spirit they were
assuming too much of how the macros were going to be used.  (Note that these
macros are now unused, but the intention is to introduce some usage in a
future autovacuum patch, which is why they weren't completely removed.)

Also, do not call the string validation routine when not validating.  It seems
less error-prone this way, per commentary on the amoptions SGML docs.
src/backend/access/common/reloptions.c
src/include/access/reloptions.h