[GENERAL] Two versions of an extension in the same cluster?

Поиск
Список
Период
Сортировка
От Paul Jungwirth
Тема [GENERAL] Two versions of an extension in the same cluster?
Дата
Msg-id 470f9d4a-a448-f23e-7179-b3f25bec70e4@illuminatedcomputing.com
обсуждение исходный текст
Ответы Re: [GENERAL] Two versions of an extension in the same cluster?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hello,

I've got an extension that supplies functions written in C. Two 
databases from the same cluster both use this extension. I understand 
how I can load the example--2.0.0.sql file in one database, and 
example--3.0.0.sql in another, but from what I can tell both databases 
still share the same .so file. Is there any way to provide a separate 
.so for each version?

If not, what is the best approach for releasing a new .so that keeps the 
old functionality? I guess something this?:
    # example--2.0.0.sql    CREATE OR REPLACE FUNCTION    myfunc(anyarray)    RETURNS integer    AS 'example',
'myfunc_v2_0_0'   LANGUAGE c IMMUTABLE;
 
    # example--3.0.0.sql    CREATE OR REPLACE FUNCTION    myfunc(anyarray)    RETURNS integer    AS 'example',
'myfunc_v3_0_0'   LANGUAGE c IMMUTABLE;
 

Thanks,
Paul


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Randy Strauss
Дата:
Сообщение: Re: [GENERAL] multiple sql results to shell
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Two versions of an extension in the same cluster?