Search Postgresql Archives

Two versions of an extension in the same cluster?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux