Re: contrib function naming, and upgrade issues

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: contrib function naming, and upgrade issues
Дата
Msg-id 87k56j10ww.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на Re: contrib function naming, and upgrade issues  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: contrib function naming, and upgrade issues
Re: contrib function naming, and upgrade issues
Список pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
Tom> I agree that this wasn't an amazingly good choice, but I thinkTom> there's no real risk of name collisions because
fmgronlyTom> searches for such names within the particular .so.
 

Oh, if only life were so simple.

Consider two modules mod1 (source files mod1a.c and mod1b.c) and mod2
(source files mod2a.c and mod2b.c).

mod1a.c: contains sql-callable function foo() which calls an extern
function bar() defined in mod1b.c. mod1a.o and mod1b.o are linked to
make mod1.so.

mod2a.c: contains sql-callable function baz() which calls an extern
function bar() defined in mod2b.c. These are linked to make mod2.so.

Guess what happens when foo() and baz() are both called from within
the same backend....

(Perhaps we should be linking contrib and pgxs modules with -Bsymbolic
on those platforms where it matters?)

-- 
Andrew.


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: small but useful patches for text search
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: contrib function naming, and upgrade issues