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

Re: development setup and libdir

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: development setup and libdir
Date: 2010-01-30 21:51:44
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

Ivan Sergio Borgonovo wrote:
> On Sat, 30 Jan 2010 11:06:02 -0500
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> writes:
>>> ... I can't make install (provided it works as expected, I
>>> didn't try yet) since I sincerely hope that my user doesn't have
>>> write right on whatever is pointed by $libdir.
>> Why not?  In order to install a C function, you have to be
>> superuser, which means you already have the keys to the kingdom
>> database-wise. There is no reason to not give a developer of C
>> functions write access on $libdir.  He could do whatever he wanted
>> inside the C code anyway.
> It is becoming a more serious issue than what I thought...
> Debian install everything in
> /usr/lib/postgresql/8.3/lib/
> -rw-r--r-- 1 root root
> so definitively it would be hard to write there.
> Still I'd like to keep a standard installation of Debian and just
> compile my extension somewhere else where the postgres user can read.
> I just discovered that depending on the postgres version .so are
> created with different names ( vs and then
> renamed. Since I'd like to use as much as possible of all the magic
> that pgxs and provided makefile do... and I may discover that the
> renaming is not the only change between versions, I'd prefer all
> this magic happens using make install.
> I've read I can use prefix.
> From my understanding you can set prefix from configure but:
> - maybe you've just installed debian -dev package
> - running configure for each extension you'd like to place in a
>   different path is just a pain especially if you would really like
>   to keep configuration identical with the exception of the install
>   dir
> I've tried to
> export USE_PGSX=1; make install /mydir
> export USE_PGSX=1; make install prefix=/mydir
> with no success. make still try to copy stuff
> in /usr/lib/postgresql/...
> What am I supposed to do to install modules where I want?

pgxs is about building somrthing that will install in the configured 
locations. If you don't want to install in the configured locations 
don't build/install with pgxs.

For development purposes you would be far better off building a private 
version of postgres (with configure --prefix=/path) and using its pgxs 
to build, install and test your module.



In response to


pgsql-hackers by date

Next:From: Ivan Sergio BorgonovoDate: 2010-01-30 22:36:36
Subject: Re: development setup and libdir
Previous:From: Matteo BeccatiDate: 2010-01-30 21:43:50
Subject: Re: mailing list archiver chewing patches

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