From: | Paul Jungwirth <pj(at)illuminatedcomputing(dot)com> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Two versions of an extension in the same cluster? |
Date: | 2017-10-23 22:17:40 |
Message-ID: | 470f9d4a-a448-f23e-7179-b3f25bec70e4@illuminatedcomputing.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-10-23 22:43:30 | Re: Two versions of an extension in the same cluster? |
Previous Message | Randy Strauss | 2017-10-23 22:14:28 | Re: multiple sql results to shell |