• Tom Lane's avatar
    Tighten up allowed names for custom GUC parameters. · 3db826bd
    Tom Lane authored
    Formerly we were pretty lax about what a custom GUC's name could
    be; so long as it had at least one dot in it, we'd take it.
    However, corner cases such as dashes or equal signs in the name
    would cause various bits of functionality to misbehave.  Rather
    than trying to make the world perfectly safe for that, let's
    just require that custom names look like "identifier.identifier",
    where "identifier" means something that scan.l would accept
    without double quotes.
    
    Along the way, this patch refactors things slightly in guc.c
    so that find_option() is responsible for reporting GUC-not-found
    cases, allowing removal of duplicative code from its callers.
    
    Per report from Hubert Depesz Lubaczewski.  No back-patch,
    since the consequences of the problem don't seem to warrant
    changing behavior in stable branches.
    
    Discussion: https://postgr.es/m/951335.1612910077@sss.pgh.pa.us
    3db826bd
guc-file.l 32.4 KB