Introduce PG_MODULE_MAGIC_EXT macro.
Tom Lane <tgl@sss.pgh.pa.us>
Introduce PG_MODULE_MAGIC_EXT macro. This macro allows dynamically loaded shared libraries (modules) to provide a wired-in module name and version, and possibly other compile-time-constant fields in future. This information can be retrieved with the new pg_get_loaded_modules() function. This feature is expected to be particularly useful for modules that do not have any exposed SQL functionality and thus are not associated with a SQL-level extension object. But even for modules that do belong to extensions, being able to verify the actual code version can be useful. Author: Andrei Lepikhov <lepihov@gmail.com> Reviewed-by: Yurii Rashkovskii <yrashk@omnigres.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/dd4d1b59-d0fe-49d5-b28f-1e463b68fa32@gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| contrib/auto_explain/auto_explain.c | modified | +4 −1 |
| contrib/auto_explain/t/001_auto_explain.pl | modified | +13 −0 |
| doc/src/sgml/func.sgml | modified | +22 −0 |
| doc/src/sgml/xfunc.sgml | modified | +27 −0 |
| src/backend/commands/extension.c | modified | +53 −0 |
| src/backend/utils/fmgr/dfmgr.c | modified | +56 −11 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.dat | modified | +7 −0 |
| src/include/fmgr.h | modified | +64 −15 |
| src/tools/pgindent/typedefs.list | modified | +1 −0 |
Documentation touched
Discussion
- Add Postgres module info 52 messages · 2024-12-11 → 2025-03-27