Re: Why can't I use pgxs to build a plpgsql plugin? - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Why can't I use pgxs to build a plpgsql plugin?
Date
Msg-id 4F8D0F54.2070801@enterprisedb.com
Whole thread Raw
In response to Re: Why can't I use pgxs to build a plpgsql plugin?  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: Why can't I use pgxs to build a plpgsql plugin?
List pgsql-hackers
On 17.04.2012 07:56, Pavel Stehule wrote:
> 2012/4/16 Heikki Linnakangas<heikki.linnakangas@enterprisedb.com>:
>> Ok, committed. I fixed the .PHONY line as Tom pointed out, and changed MSVC
>> install.pm to also copy the header file.
>
> Hello,
>
> it doesn't work for modules from contrib directory
>
> pavel ~/src/postgresql/contrib/check_plpgsql $ make
> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
> -Wdeclaration-after-statement -Wendif-labels
> -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
> -fwrapv -fexcess-precision=standard -g -fpic -I. -I.
> -I../../src/include -D_GNU_SOURCE   -c -o check_plpgsql.o
> check_plpgsql.c
> check_plpgsql.c:16:21: fatal error: plpgsql.h: No such file or directory
> compilation terminated.

Hmm, the makefile rule I added copies the plpgsql.h file to 
include/server directory when you do "make install". That makes the file 
available when you build with USE_PGXS=1, without access to the source 
tree, but doesn't change the situation when you build inside contrib.

If you plop the module directly to contrib, I guess you'll have to do

CFLAGS += -I$(top_srcdir)/src/pl/plpgsql/src

That's what pldebugger has always done.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Gsoc2012 idea, tablesample
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: [BUG] Checkpointer on hot standby runs without looking checkpoint_segments