From: TJ O'Donnell <tjo@acm.org>
To: pgsql-sql@postgresql.org
Subject: dynamically loaded functions
Date: Mon, 11 Jul 2005 20:16:17 -0700
Message-ID: <42D33601.5080605@acm.org> (raw)
I've written some c-functions which depend on my code (gnova.so)
as well as a third-party library of functions (oe_chem.so).
Up until now, I've been preloading (in postgresql.conf) both .so's
and it all works fine. To make it easier for my users to install my stuff,
I'd like to avoid the preloading, but this would
require giving 2 .so names in the CREATE FUNCTION statement (I imagine).
So, what I would like to do is something like this:
CREATE or REPLACE FUNCTION cansmiles(varchar) RETURNS varchar
AS 'gnova,oe_chem', 'oe_cansmiles' LANGUAGE 'c' IMMUTABLE STRICT;
but I get this:
ERROR: could not access file "gnova,oe_chem": No such file or directory
What I'm doing now:
CREATE or REPLACE FUNCTION cansmiles(varchar) RETURNS varchar
AS 'gnova', 'oe_cansmiles' LANGUAGE 'c' IMMUTABLE STRICT;
requires preloading of oe_chem.so to work.
Is there any way I can associate oe_cansmiles with 2 .so's without
preloading?
More info:
oe_cansmiles is in gnova.so, but there are functions
in gnova.so that are in oe_chem.so.
TJ
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tjo@acm.org
Subject: Re: dynamically loaded functions
In-Reply-To: <42D33601.5080605@acm.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox