[GENERAL] Two versions of an extension in the same cluster? - Mailing list pgsql-general

From Paul Jungwirth
Subject [GENERAL] Two versions of an extension in the same cluster?
Date
Msg-id 470f9d4a-a448-f23e-7179-b3f25bec70e4@illuminatedcomputing.com
Whole thread Raw
Responses Re: [GENERAL] Two versions of an extension in the same cluster?
List 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 by date:

Previous
From: Randy Strauss
Date:
Subject: Re: [GENERAL] multiple sql results to shell
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] Two versions of an extension in the same cluster?