proposal - get_extension_version function

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема proposal - get_extension_version function
Дата
Msg-id CAFj8pRAiMQU6r2AKopeEfDBDPGp-WTaq0MdQfFwzzyobdKTavg@mail.gmail.com
обсуждение исходный текст
Ответы Re: proposal - get_extension_version function  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: proposal - get_extension_version function  (Pavel Stehule <pavel.stehule@gmail.com>)
Список 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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: allow meson to find ICU in non-standard localtion
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: Should vacuum process config file reload more often