Re: proposal - get_extension_version function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: proposal - get_extension_version function
Дата
Msg-id 212074.1678301349@sss.pgh.pa.us
обсуждение исходный текст
Ответ на proposal - get_extension_version function  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal - get_extension_version function  (Jacob Champion <jchampion@timescale.com>)
Re: proposal - get_extension_version function  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> I try to write a safeguard check that ensures the expected extension
> version for an extension library.

This is a bad idea.  How will you do extension upgrades, if the new .so
won't run till you apply the extension upgrade script but the old .so
malfunctions as soon as you do?  You need to make the C code as forgiving
as possible, not as unforgiving as possible.

If you have C-level ABI changes you need to make, the usual fix is to
include some sort of version number in the C name of each individual
function you've changed, so that calls made with the old or the new SQL
definition will be routed to the right place.  There are multiple
examples of this in contrib/.

            regards, tom lane



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

Предыдущее
От: Melanie Plageman
Дата:
Сообщение: Re: Add shared buffer hits to pg_stat_io
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: psql \watch 2nd argument: iteration count