From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: Hiding undocumented enum values? |
Date: | 2008-05-27 18:03:59 |
Message-ID: | 20080527200359.352520c4@mha-laptop.hagander.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> There are several GUC enums that accept values that aren't documented
> anywhere; the worst offender being backslash_quote, which has more
> undocumented spellings than documented ones:
>
> /*
> * Although only "on", "off", and "safe_encoding" are documented, we
> * accept all the likely variants of "on" and "off".
> */
> static const struct config_enum_entry backslash_quote_options[] = {
> {"safe_encoding", BACKSLASH_QUOTE_SAFE_ENCODING},
> {"on", BACKSLASH_QUOTE_ON},
> {"off", BACKSLASH_QUOTE_OFF},
> {"true", BACKSLASH_QUOTE_ON},
> {"false", BACKSLASH_QUOTE_OFF},
> {"yes", BACKSLASH_QUOTE_ON},
> {"no", BACKSLASH_QUOTE_OFF},
> {"1", BACKSLASH_QUOTE_ON},
> {"0", BACKSLASH_QUOTE_OFF},
> {NULL, 0}
> };
>
> I am wondering if it's a good idea to hide the redundant entries
> to reduce clutter in the pg_settings display. (We could do this
> by adding a "hidden" boolean to struct config_enum_entry.)
> Thoughts?
Seems reasonable. Another option would be to simply drop the
undocumented options, but then it wouldn't be "compatible" with pure
boolean variables so I think that would be a bad idea.
I can do this tomorrow if there are no people making good arguments for
dropping them completely.
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2008-05-27 18:05:45 | Re: Hiding undocumented enum values? |
Previous Message | Magnus Hagander | 2008-05-27 18:02:06 | Re: ERRORDATA_STACK_SIZE panic crashes on Windows |