pgsql: Refactor unit conversions code in guc.c. - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Refactor unit conversions code in guc.c.
Date
Msg-id E1YPvWd-0006Ce-5X@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Refactor unit conversions code in guc.c.

Replace the if-switch-case constructs with two conversion tables,
containing all the supported conversions between human-readable unit
strings and the base units used in GUC variables. This makes the code
easier to read, and makes adding new units simpler.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/1b6302647302f459fdb63008c3842a1b0d43d1b7

Modified Files
--------------
src/backend/utils/misc/guc.c |  431 +++++++++++++++++++-----------------------
src/include/utils/guc.h      |    2 +
2 files changed, 193 insertions(+), 240 deletions(-)


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: pgsql: Guard against spurious signals in LockBufferForCleanup.
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Renumber GUC_* constants.