Re: development setup and libdir
От | Andrew Dunstan |
---|---|
Тема | Re: development setup and libdir |
Дата | |
Msg-id | 4B64A9F0.4080007@dunslane.net обсуждение исходный текст |
Ответ на | Re: development setup and libdir (Ivan Sergio Borgonovo <mail@webthatworks.it>) |
Ответы |
Re: development setup and libdir
|
Список | pgsql-hackers |
Ivan Sergio Borgonovo wrote: > On Sat, 30 Jan 2010 11:06:02 -0500 > Tom Lane <tgl@sss.pgh.pa.us> wrote: > > >> Ivan Sergio Borgonovo <mail@webthatworks.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 (module.so vs libmodule.so) 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. cheers andrew
В списке pgsql-hackers по дате отправления: