Skip site navigation (1) Skip section navigation (2)

Re: development setup and libdir

From: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: development setup and libdir
Date: 2010-02-01 23:57:21
Message-ID: (view raw or whole thread)
Lists: pgsql-hackers
On Sun, 31 Jan 2010 22:24:40 +0000
Mark Cave-Ayland <mark(dot)cave-ayland(at)siriusit(dot)co(dot)uk> wrote:

> Ivan Sergio Borgonovo wrote:
> > Of course I can write a script that can workaround this.
> > It seems that the only thing missing is that pgxs 8.3 used to
> > prefix .so with lib and then rename them at install time, but
> > pgxs 8.4 build them directly without prefix.
> > I'm just speculating this is the issue and it is the only one I
> > still have to solve... but... what's going to happen next
> > release? Wouldn't it be better if make install could install
> > stuff where I ask so I could put modules in different places
> > *even* for the same installation of postgres?

> FWIW the soon-to-be-released PostGIS 1.5 has an "out of place" 
> regression testing feature that allows PostGIS to be built using
> PGXS and regression tested without putting anything in the
> PostgreSQL installation directory itself.

Thanks I'll give a look as soon as possible, now I'll try to
concentrate on C development.

I used something surely simpler.
I wrote this small script and it actually does what I need.

export USE_PGXS=1; make

MODULE_big=$(sed -ne '/MODULE_big/s/^MODULE_big[ \t]*=[ \t]*\([^
\t]*\)/\1/gp' Makefile)

so=$(ls -1 *"$MODULE_big"*.so)

sed -e 's#\$libdir[^'"'"']*#'`pwd -P`'/'$so'#g' $MODULE_big.sql >

sed -e 's#\$libdir[^'"'"']*#'`pwd -P`'/'$so'#g'
uninstall_$MODULE_big.sql > uninstall_$MODULE_big.l.sql psql

psql test < $MODULE_big.l.sql

/* some more stuff to test functions */

And finally I have my first function working. Without other
functions the extension isn't that useful yet but I think I'll be
able to build something useful.

Thanks for the help. Especially to RhodiumToad and klando on

I'll try to write some documentation shortly.

Ivan Sergio Borgonovo

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-02-02 00:02:45
Subject: Re: Database-Role settings behaviour and docs mismatch
Previous:From: Simon RiggsDate: 2010-02-01 23:18:48
Subject: Re: Database-Role settings behaviour and docs mismatch

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group