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: Peter Eisentraut <peter.eisentraut@enterprisedb.com>, Fujii Masao
<masao.fujii@oss.nttdata.com>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, Daniel
Gustafsson <daniel@yesql.se>, PostgreSQL-development
<pgsql-hackers@postgresql.org>
Date: 2021-12-20T12:05:23Z
Lists: pgsql-hackers
Attachments
- v6-0001-Add-EmitWarningsOnPlaceholders.patch (text/x-diff) patch v6-0001
- v6-0002-Change-error-level-of-EmitWarningsOnPlaceholders.patch (text/x-diff) patch v6-0002
- v6-0003-Emit-error-when-invalid-extensions-GUCs-are-set.patch (text/x-diff) patch v6-0003
On 2021-12-17 15:42, Peter Eisentraut wrote: > On 17.12.21 03:25, Shinya Kato wrote: >> For now, I'v attached the patch that fixed the compilation error. > > I think it would be good if you could split the uncontroversial new > EmitErrorsOnPlaceholders() calls into a separate patch. And please > add an explanation what exactly the rest of the patch changes. Thank you for the comment! I splitted the patch. - v6-01-Add-EmitWarningsOnPlaceholders.patch We should use EmitWarningsOnPlaceholders when we use DefineCustomXXXVariable. I don't think there is any room for debate. - v6-0002-Change-error-level-of-EmitWarningsOnPlaceholders.patch This is a patch to change the error level of EmitWarningsOnPlaceholders from WARNING to ERROR. I think it's OK to emit ERROR as well as when the wrong GUC is set for non-extensions, or since it does not behave abnormally, it can be left as WARNING. Thought? - v6-0003-Emit-error-when-invalid-extensions-GUCs-are-set.patch This is a patch to emit error when invalid extension's GUCs are set. No test changes have been made, so the regression test will fail. I have created a patch, but I don't think this is necessary because of the previous discussion. -- Regards, -- Shinya Kato Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
Commits
-
Disallow setting bogus GUCs within an extension's reserved namespace.
- 88103567cb8f 15.0 landed
-
Revert changes about warnings/errors for placeholders.
- cab5b9ab2c06 15.0 landed
-
Rename EmitWarningsOnPlaceholders() to MarkGUCPrefixReserved().
- 5609cc01c69b 15.0 landed
-
Rethink handling of settings with a prefix reserved by an extension.
- 2ed8a8cc5b63 15.0 landed
-
Add missing EmitWarningsOnPlaceholders() calls.
- 1fada5d81e67 15.0 landed
-
Add EmitWarningsOnPlaceholders calls to contrib modules that are likely to
- da2c1b8a27af 8.4.0 cited