Hi Tom,
I built v1 on current master and tested it -- the display is consistent now:
pg_settings shows setting/min_val/max_val/boot_val/reset_val all in octal for
the three mode GUCs, and SHOW / current_setting agree. The out-of-range error
comes out in octal too (ALTER SYSTEM SET log_file_mode = 0640 -> "01200 is
outside the valid range ... (0000 .. 0777)"). The new flag bit (0x010000) is
the first free one below the unit flags, no collision. make check is green.
I also checked that dropping the show_hooks doesn't change "postgres -C": it
still prints decimal (511), but that's not a regression -- GetConfigOption()
already formatted PGC_INT with %d and never went through the show_hook, so -C
was decimal before too. Matches your note about GetConfigOption() being out
of scope.
One optional thought on that range error: since an unquoted 0640 is decimal
640 in SQL (not octal), the "01200" can be a little surprising to someone who
meant octal -- the value they typed and the value echoed back don't visibly
line up. A small errhint might smooth that over without reintroducing decimal
into the message, e.g.
ERROR: 01200 is outside the valid range for parameter "log_file_mode"
(0000 .. 0777)
HINT: To specify an octal value, quote it, e.g. '0640'.
Fully optional, and it does edge toward input handling rather than display, so
feel free to ignore.
LGTM.
Regards,
Rui