]> granicus.if.org Git - postgresql/commit
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)
commit8ebe1e356c8c3bd1f65ff76cc5967478e969d1c2
tree3b80e4e61f8c4eb325c90832d1b5ed6ad483f4d0
parent8a4505013d9f19979fa83fced5588311d3b123d2
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