| From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | proposal - get_extension_version function |
| Date: | 2023-03-08 16:58:58 |
| Message-ID: | CAFj8pRAiMQU6r2AKopeEfDBDPGp-WTaq0MdQfFwzzyobdKTavg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi
I try to write a safeguard check that ensures the expected extension
version for an extension library.
Some like
const char *expected_extversion = "2.5";
...
extoid = getExtensionOfObject(ProcedureRelationId, fcinfo->flinfo->fn_oid));
extversion = get_extension_version(extoid);
if (strcmp(expected_extversion, extversion) != 0)
elog(ERROR, "extension \"%s\" needs \"ALTER EXTENSION %s UPDATE\",
get_extension_name(extversion),
get_extension_name(extversion)))
Currently the extension version is not simply readable - I need to read
directly from the table.
Notes, comments?
Regards
Pavel
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim Nasby | 2023-03-08 17:42:31 | Re: Should vacuum process config file reload more often |
| Previous Message | Peter Eisentraut | 2023-03-08 16:30:28 | Re: allow meson to find ICU in non-standard localtion |