| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Introduce PG_MODULE_MAGIC_EXT macro. |
| Date: | 2025-03-26 15:11:32 |
| Message-ID: | E1txSPk-0016ag-0Q@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(at)gmail(dot)com>
Reviewed-by: Yurii Rashkovskii <yrashk(at)omnigres(dot)com>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Discussion: https://postgr.es/m/dd4d1b59-d0fe-49d5-b28f-1e463b68fa32@gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9324c8c580655800331b0582b770e88c01b7a5c4
Modified Files
--------------
contrib/auto_explain/auto_explain.c | 5 +-
contrib/auto_explain/t/001_auto_explain.pl | 13 +++++
doc/src/sgml/func.sgml | 22 +++++++++
doc/src/sgml/xfunc.sgml | 27 ++++++++++
src/backend/commands/extension.c | 53 ++++++++++++++++++++
src/backend/utils/fmgr/dfmgr.c | 67 ++++++++++++++++++++-----
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 7 +++
src/include/fmgr.h | 79 ++++++++++++++++++++++++------
src/tools/pgindent/typedefs.list | 1 +
10 files changed, 248 insertions(+), 28 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tomas Vondra | 2025-03-26 16:06:02 | pgsql: Keep the decompressed filter in brin_bloom_union |
| Previous Message | Daniel Gustafsson | 2025-03-26 14:37:03 | pgsql: Move GSSAPI includes into its own header |