From: Shinya Kato <Shinya11.Kato@oss.nttdata.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Emit a warning if the extension's GUC is set incorrectly
Date: Mon, 15 Nov 2021 10:03:22 +0900
Message-ID: <25643eaa81a69416317e85c2fd7d4c0a@oss.nttdata.com> (raw)
In-Reply-To: <681A95E0-0CCA-4C66-A12B-CE0D8D5076D7@yesql.se>
References: <524fa2c0a34f34b68fbfa90d0760d515@oss.nttdata.com>
<681A95E0-0CCA-4C66-A12B-CE0D8D5076D7@yesql.se>
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
Attachments:v2_Add_EmitWarningOnPlaceholderes.patch (text/x-diff, 1.7K) downloaddiff --git a/contrib/auth_delay/auth_delay.c b/contrib/auth_delay/auth_delay.cindex 5820ac328d..d11dd1e416 100644--- a/contrib/auth_delay/auth_delay.c+++ b/contrib/auth_delay/auth_delay.c@@ -67,6 +67,9 @@ _PG_init(void)
NULL,
NULL,
NULL);
++ EmitWarningsOnPlaceholders("auth_delay");+
/* Install Hooks */
original_client_auth_hook = ClientAuthentication_hook;
ClientAuthentication_hook = auth_delay_checks;
diff --git a/contrib/pg_trgm/trgm_op.c b/contrib/pg_trgm/trgm_op.cindex fb38135f7a..0407c7dd64 100644--- a/contrib/pg_trgm/trgm_op.c+++ b/contrib/pg_trgm/trgm_op.c@@ -100,6 +100,8 @@ _PG_init(void)
NULL,
NULL,
NULL);
++ EmitWarningsOnPlaceholders("pg_trgm");
}
/*
diff --git a/contrib/postgres_fdw/option.c b/contrib/postgres_fdw/option.cindex 48c7417e6e..36555398ec 100644--- a/contrib/postgres_fdw/option.c+++ b/contrib/postgres_fdw/option.c@@ -469,4 +469,6 @@ _PG_init(void)
NULL,
NULL,
NULL);
++ EmitWarningsOnPlaceholders("postgres_fdw");
}
diff --git a/contrib/sepgsql/hooks.c b/contrib/sepgsql/hooks.cindex 19a3ffb7ff..44a09c35a7 100644--- a/contrib/sepgsql/hooks.c+++ b/contrib/sepgsql/hooks.c@@ -455,6 +455,8 @@ _PG_init(void)
NULL,
NULL);
+ EmitWarningsOnPlaceholders("sepgsql");+
/* Initialize userspace access vector cache */
sepgsql_avc_init();
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.cindex e11837559d..1389aa0943 100644--- a/src/pl/tcl/pltcl.c+++ b/src/pl/tcl/pltcl.c@@ -474,6 +474,8 @@ _PG_init(void)
PGC_SUSET, 0,
NULL, NULL, NULL);
+ EmitWarningsOnPlaceholders("pltclu");+
pltcl_pm_init_done = true;
}
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: Shinya11.Kato@oss.nttdata.com, daniel@yesql.se
Subject: Re: Emit a warning if the extension's GUC is set incorrectly
In-Reply-To: <25643eaa81a69416317e85c2fd7d4c0a@oss.nttdata.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox