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: 20100202005721.2cff27e4@dawn.webthatworks.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
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.

#!/bin/bash
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 >
$MODULE_big.l.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
#postgresql

I'll try to write some documentation shortly.

--
Ivan Sergio Borgonovo
http://www.webthatworks.it

In response to

Browse pgsql-hackers by date

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