Re: Problems using palloc in postgresql user C functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problems using palloc in postgresql user C functions
Дата
Msg-id 6473.1048083766@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Problems using palloc in postgresql user C functions  (John Gunther <inbox@bucksvsbytes.com>)
Ответы Re: Problems using palloc in postgresql user C functions  (Joe Conway <mail@joeconway.com>)
Список pgsql-novice
John Gunther <inbox@bucksvsbytes.com> writes:
> In line with your responses, I'm already supplying my library with the
> prototypes for all the needed PG functions, like textin. The problem is
> when compiling and linking, how does libtool/gcc find or point to the
> actual code for textin so it can execute it when needed.

It doesn't.  You should be building a shared library, not a standalone
executable.  Unresolved references get bound when the library is loaded
by the backend, not when the library is built.

I'd suggest building one of the backend-extension modules in contrib/,
and looking to see what commands get used to compile and link on your
platform.

            regards, tom lane

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

Предыдущее
От: John Gunther
Дата:
Сообщение: Re: Problems using palloc in postgresql user C functions
Следующее
От: Joe Conway
Дата:
Сообщение: Re: Problems using palloc in postgresql user C functions