dynamically loaded functions

Поиск
Список
Период
Сортировка
От TJ O'Donnell
Тема dynamically loaded functions
Дата
Msg-id 42D33601.5080605@acm.org
обсуждение исходный текст
Ответы Re: dynamically loaded functions  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-sql
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'
IMMUTABLESTRICT;
 

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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Copy user privileges
Следующее
От: "Dinesh Pandey"
Дата:
Сообщение: How to store and retrieve data with special characters (\n, \r, \f, \t) in the same format