ALTER EXTENSION UPDATE: How to update the 'module_pathname'?

Started by Henrik Kuhnover 13 years ago2 messagesgeneral
Jump to latest
#1Henrik Kuhn
henrik.kuhn@origenis.de

Hi,

after installing an extension with functions with C bindings - CREATE OR
REPLACE FUNCTION ... AS 'MODULE_PATHNAME' LANGUAGE C ... - I like to
change the 'module_pathname' upon its update. After reading the docs and
especially the section of 'ALTER EXTENSION' I have the feeling, that
this operation is not possible.

First tries lead to the assumption, that the control-file is not
re-parsed in order to reflect any changes in the 'module_pathname'. I'm
correct with my observation?
Is this 'module_pathname' somewhere stored in the internals of some
pg_tables? If yes, it should be possible to update this entry and call
ALTER EXTENSION UPDATE again.

What I do not want to do is a DELETE/CREATE EXTENSION process.

Any suggestions?

Regards,
Henrik

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

#2Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Henrik Kuhn (#1)
Re: ALTER EXTENSION UPDATE: How to update the 'module_pathname'?

Henrik Kuhn wrote:

after installing an extension with functions with C bindings - CREATE OR
REPLACE FUNCTION ... AS 'MODULE_PATHNAME' LANGUAGE C ... - I like to
change the 'module_pathname' upon its update. After reading the docs and
especially the section of 'ALTER EXTENSION' I have the feeling, that
this operation is not possible.

First tries lead to the assumption, that the control-file is not
re-parsed in order to reflect any changes in the 'module_pathname'. I'm
correct with my observation?
Is this 'module_pathname' somewhere stored in the internals of some
pg_tables? If yes, it should be possible to update this entry and call
ALTER EXTENSION UPDATE again.

What I do not want to do is a DELETE/CREATE EXTENSION process.

Any suggestions?

I think your problem can be solved by creating a new version of
your extension. In the update script you can have the
CREATE OR REPLACE FUNCTION statements you need.

Yours,
Laurenz Albe

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