Re: Problems using palloc in postgresql user C functions

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: Problems using palloc in postgresql user C functions
Дата
Msg-id 3E788643.1020806@joeconway.com
обсуждение исходный текст
Ответ на Re: Problems using palloc in postgresql user C functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Problems using palloc in postgresql user C functions  (John Gunther <inbox@bucksvsbytes.com>)
Список pgsql-novice
Tom Lane wrote:
> 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.
>

Another suggestion is to put your extension in a directory under
contrib, and copy and edit another contrib's Makefile. They are pretty
simple, e.g. let's say your library is called foo, and you put foo.c,
foo.h, and foo.sql.in in contrib/foo. Your Makefile would look like:

8<-------------------------------------
subdir = contrib/foo
top_builddir = ../..
include $(top_builddir)/src/Makefile.global

MODULES = foo
DATA_built = foo.sql

include $(top_srcdir)/contrib/contrib-global.mk
8<-------------------------------------

Now you can do (from contrib/foo):

   make
   make install
   psql myfoodatabase < foo.sql

to build and install foo.so.

For more info on the contrib Makefile layout and variables, look at the
comments in contrib/contrib-global.mk

Joe


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Problems using palloc in postgresql user C functions
Следующее
От: Martin Ruff
Дата:
Сообщение: pg_dump ,pg_restore problem