Обсуждение: postgresql & Debian

Поиск
Список
Период
Сортировка

postgresql & Debian

От
"Paolo Sinigaglia"
Дата:
Hi there,
I'll begin admitting I'm quite a novice **both** in pgSQL and Linux OS. :)

Besides that, I tried to install PG on my Debian (Potato) GNU/Linux PC
(x386) and, after very little troubles, worked fine.

When I tried to create a table with a foreign key, I found F-keys are not
implemented in PG 6.5.3 but only in 7.x. Good. Download the source. Make &
Install. At last it worked.

Now I have a postgreSQL 7.0.2 up and running, but I can't create the
language PL/PERL due to the fact that libperl is not a shared library.

I have been discouraged regarding the obvious solution of recompiling the
perl library by a friend who told me that doing so I'll probably crash the
system, but I can't see any way to solve this problem.

Now the questions:

Is it true? Is it really (so) dangerous to recompile libperl as a shared
libary?
Is there another way to have PG using PL/PERL?
Is it possible havig two libperl installed (shared and static) at the same
time?
Any smarter idea?

Thanks in advance

Paolo Sinigaglia


Re: postgresql & Debian

От
"Oliver Elphick"
Дата:
"Paolo Sinigaglia" wrote:
  >Hi there,
  >I'll begin admitting I'm quite a novice **both** in pgSQL and Linux OS. :)
  >
  >Besides that, I tried to install PG on my Debian (Potato) GNU/Linux PC
  >(x386) and, after very little troubles, worked fine.
  >
  >When I tried to create a table with a foreign key, I found F-keys are not
  >implemented in PG 6.5.3 but only in 7.x. Good. Download the source. Make &
  >Install. At last it worked.
  >
  >Now I have a postgreSQL 7.0.2 up and running, but I can't create the
  >language PL/PERL due to the fact that libperl is not a shared library.
  >
  >I have been discouraged regarding the obvious solution of recompiling the
  >perl library by a friend who told me that doing so I'll probably crash the
  >system, but I can't see any way to solve this problem.
  >
  >Now the questions:
  >
  >Is it true? Is it really (so) dangerous to recompile libperl as a shared
  >libary?
  >Is there another way to have PG using PL/PERL?
  >Is it possible havig two libperl installed (shared and static) at the same
  >time?
  >Any smarter idea?

olly@linda$ dlocate libperl.so
libperl5.6: /usr/lib/libperl.so.5.6.0
libperl5.6: /usr/lib/libperl.so.5.6
olly@linda$ dpkg -l libperl5.6
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  libperl5.6     5.6.0-20       Shared Perl library.

You can presumably build this package from source as well.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Come unto me, all ye that labour and are heavy laden,
      and I will give you rest. Take my yoke upon you, and
      learn of me; for I am meek and lowly in heart; and ye
      shall find rest unto your souls."
                                 Matthew 11:28,29



Re: postgresql & Debian

От
Tom Lane
Дата:
"Paolo Sinigaglia" <sini@informativesystem.it> writes:
> Is there another way to have PG using PL/PERL?

On some platforms, *all* code is position-independent and so it's
possible to link a standard libperl.a into the plperl.so shared library.
If your box is like that, then you could just take out the check for
is-libperl-shared in plperl's Makefile.PL.  If you're not sure, try it;
worst case is the link step will fail.

            regards, tom lane