Re: Emit a warning if the extension's GUC is set incorrectly

Shinya Kato <shinya11.kato@oss.nttdata.com>

From: Shinya Kato <Shinya11.Kato@oss.nttdata.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: pgsql-hackers@postgresql.org
Date: 2021-11-15T01:03:22Z
Lists: pgsql-hackers

Attachments

On 2021-11-15 04:50, Daniel Gustafsson wrote:
> Seems reasonable on a quick skim, commit da2c1b8a2 did a similar 
> roundup back
> in 2009 but at the time most of these didn't exist (pg_trgm did but 
> didn't have
> custom option back then).  There is one additional callsite defining 
> custom
> variables in src/pl/tcl/pltcl.c which probably should get this 
> treatment as
> well, it would align it with the pl/perl counterpart.
> 
> I'll have a closer look and test tomorrow.
Thank you for the review!
I have missed src/pl/tcl/pltcl.c, so I created the new patch.

-- 
Regards,

--
Shinya Kato
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Commits

  1. Disallow setting bogus GUCs within an extension's reserved namespace.

  2. Revert changes about warnings/errors for placeholders.

  3. Rename EmitWarningsOnPlaceholders() to MarkGUCPrefixReserved().

  4. Rethink handling of settings with a prefix reserved by an extension.

  5. Add missing EmitWarningsOnPlaceholders() calls.

  6. Add EmitWarningsOnPlaceholders calls to contrib modules that are likely to