Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> BTW, I am going to look at whether GUC can be persuaded to continue to
>> allow "sort_mem" as an alternate name, if we rename it. That would
>> alleviate most of the backward-compatibility issues of changing such
>> a well-known parameter name.
> Good. It is not like we have a huge namespace limitation in there. I
> wonder if we could cost it as a list of string pointers, null
> terminated.
After looking at the code a bit, I think the simplest solution is for
find_option to look in a separate mapping table (mapping from old to new
option name) if it doesn't find the given name in the main table. This
would make lookup of "old" names a shade slower than "preferred" names,
but that doesn't seem like a problem.
With this approach, old GUC names would be recognized in SHOW and SET
commands, as well as the other ways you can set a variable by name
(postgresql.conf, ALTER USER SET, etc). But only the new names would
appear in SHOW ALL or the pg_settings view. Does that seem OK?
regards, tom lane