Re: Why can't I use pgxs to build a plpgsql plugin?

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Guillaume Lelarge <guillaume(at)lelarge(dot)info>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why can't I use pgxs to build a plpgsql plugin?
Date: 2012-04-17 06:36:04
Message-ID: 4F8D0F54.2070801@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 17.04.2012 07:56, Pavel Stehule wrote:
> 2012/4/16 Heikki Linnakangas<heikki(dot)linnakangas(at)enterprisedb(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2012-04-17 06:50:46 Re: [BUG] Checkpointer on hot standby runs without looking checkpoint_segments
Previous Message Heikki Linnakangas 2012-04-17 06:16:29 Gsoc2012 idea, tablesample