pgsql: Simplify the writing of amoptions routines by introducing a

From: alvherre(at)postgresql(dot)org (Alvaro Herrera)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Simplify the writing of amoptions routines by introducing a
Date: 2009-01-12 21:02:15
Message-ID: 20090112210215.226C0754877@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Modified Files:
--------------
pgsql/src/backend/access/common:
reloptions.c (r1.17 -> r1.18)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/common/reloptions.c?r1=1.17&r2=1.18)
pgsql/src/include/access:
reloptions.h (r1.9 -> r1.10)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/reloptions.h?r1=1.9&r2=1.10)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2009-01-13 00:54:11 pgsql: Document how pglesslog can be used to reduce the storage
Previous Message Tom Lane 2009-01-12 17:33:43 Re: pgsql: Tweak order of operations in BitmapHeapNext() to avoid the case