From: | Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
---|---|
To: | Paul Ramsey <pramsey(at)refractions(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Module Portability |
Date: | 2002-08-01 20:02:00 |
Message-ID: | Pine.GSO.4.44.0208012259300.25663-100000@ra.sai.msu.su |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Contrib modules does have such possibility.
For example:
CREATE FUNCTION ltree_in(opaque)
RETURNS opaque
AS 'MODULE_PATHNAME'
LANGUAGE 'c' with (isstrict);
Oleg
On Thu, 1 Aug 2002, Paul Ramsey wrote:
> All this talk of modularity reminds me of a pet peeve: doing
> dump/restore upgrades when your databases include extension functions is
> highly clunky, because extension functions include the fully qualified
> path to the linking library. So, for example
>
> create function geometry_in(opaque)
> RETURNS GEOMETRY
> AS '/opt/pgsql72/lib/contrib/libpostgis.so.0.7'
> LANGUAGE 'c' with (isstrict);
>
> If I do a pg_dumpall on an old database and try to pipe into a new
> database, things can get messy pretty fast. It would be nice if pgsql
> had a 'default library location' which it tried to load linking
> libraries from, in much the same way apache uses libexec. Then my
> definition could just be:
>
> create function geometry_in(opaque)
> RETURNS GEOMETRY
> AS 'libpostgis.so.0.7'
> LANGUAGE 'c' with (isstrict);
>
> Which would be alot more portable across installations. I mean, right
> now I can render my database inoperative just by moving my executable
> installation tree to a new path. Nice.
>
>
Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2002-08-01 20:05:11 | Re: getpid() function |
Previous Message | Tom Lane | 2002-08-01 20:01:49 | Re: Open 7.3 items |