Extensions that define any custom GUCs should call
EmitWarningsOnPlaceholders after doing so, to help catch misspellings.
Many of our contrib modules hadn't gotten the memo on that, though.
Also add such calls to src/test/modules extensions that have GUCs.
While these aren't really user-facing, they should illustrate good
practice not faulty practice.
Shinya Kato
Discussion: https://postgr.es/m/
524fa2c0a34f34b68fbfa90d0760d515@oss.nttdata.com
NULL,
NULL,
NULL);
+
+ EmitWarningsOnPlaceholders("auth_delay");
+
/* Install Hooks */
original_client_auth_hook = ClientAuthentication_hook;
ClientAuthentication_hook = auth_delay_checks;
NULL,
NULL,
NULL);
+
+ EmitWarningsOnPlaceholders("pg_trgm");
}
/*
NULL,
NULL,
NULL);
+
+ EmitWarningsOnPlaceholders("postgres_fdw");
}
NULL,
NULL);
+ EmitWarningsOnPlaceholders("sepgsql");
+
/* Initialize userspace access vector cache */
sepgsql_avc_init();
}
}
+/*
+ * Functions for extensions to call to define their custom GUC variables.
+ */
void
DefineCustomBoolVariable(const char *name,
const char *short_desc,
define_custom_variable(&var->gen);
}
+/*
+ * Extensions should call this after they've defined all of their custom
+ * GUCs, to help catch misspelled config-file entries,
+ */
void
EmitWarningsOnPlaceholders(const char *className)
{
PGC_SUSET, 0,
NULL, NULL, NULL);
+ EmitWarningsOnPlaceholders("pltcl");
+ EmitWarningsOnPlaceholders("pltclu");
+
pltcl_pm_init_done = true;
}
NULL,
NULL);
+ EmitWarningsOnPlaceholders("delay_execution");
+
/* Install our hook */
prev_planner_hook = planner_hook;
planner_hook = delay_execution_planner;
NULL,
NULL,
NULL);
+
+ EmitWarningsOnPlaceholders("ssl_passphrase");
+
if (ssl_passphrase)
openssl_tls_init_hook = set_rot13;
}
0,
NULL, NULL, NULL);
+ EmitWarningsOnPlaceholders("worker_spi");
+
/* set up common data for all our workers */
memset(&worker, 0, sizeof(worker));
worker.bgw_flags = BGWORKER_SHMEM_ACCESS |