Explicit LOAD and dynamic library loading

Поиск
Список
Период
Сортировка
От Stephen Scheck
Тема Explicit LOAD and dynamic library loading
Дата
Msg-id CAKjnHz39+0mCnPWgc3_UCs5=S7zeHj39hoHkqMTN3osNXdOwUA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Explicit LOAD and dynamic library loading  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hello,

I'm working on two extensions, call them "foo" and "bar". bar depends on some of the functions defined in foo. They are both built from a single Makefile, just vanilla PGXS:

MODULES = foo bar
EXTENSION = foo bar
### etc. ###

As bar depends on foo, that's specified in its .control file, and CREATE EXTENSION works just fine with foo created first, then bar.

However, whenever I run one of the UDTs defined in bar, I get this error message:

dev=# SELECT * FROM test1 WHERE (info(bar_dat)).some_prop = 10;
ERROR:  could not load library "/vol/data/home/postgres/pg-builds/9.2.4/lib/bar.so": /vol/data/home/postgres/pg-builds/9.2.4/lib/bar.so: undefined symbol: foo_func1

I have to explicitly load foo:

dev=# LOAD 'foo.so';

Then everything works. What am I missing?

Thanks.


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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Determining the type (array, object, or scalar) of a JSON value
Следующее
От: Stephen Scheck
Дата:
Сообщение: Pass-by-reference UDTs and volatility