Installing PlPerl
Hi list...
I am trying to install PLPERL in Postgresql in order to use
regular expression to eliminate any undesired character in any given
name to be inserted in the database... I believe that using plperl is
less time consuming than doing the same approach using plpgsql
(correct if I am wrong please)...
However I was faced with the following error:
$pgsql > createlang plperl template1
ERROR: Load of file /usr/local/postgresql-7.3.2/lib/plperl.so failed:
libperl.so: cannot open shared object file: No such file or directory
createlang: language installation failed
Could somebody gimme a hand!!!!
My machine:
Athlon 1.3Mhz 512Mb
Mdk 9
Postgresql 7.3.2
pg_config --configure
'--prefix=/usr/local/postgresql-7.3.2'
'--with-perl'
'--with-tcl'
'--with-pgport=5433'
'CC=gcc'
'CFLAGS=-O2 -fpic -march=athlon-mcpu=athlon'
Following is my timing consume function (remember I'Perl's newbie)
to generate a name capitalized without any punctuation/number... Any
suggestion/comment to improve function, it will be welcome...
CREATE OR REPLACE FUNCTION XP_FORMATA_NOME (VARCHAR) RETURNS
VARCHAR AS '
my $string = @_;
$string =~ tr/[a-z][0-9]\.\$%\'"@#*!?()/[A-Z] /d;
RETURN $string;
'
LANGUAGE 'plperl';
Tks...
On Wednesday 21 May 2003 5:26 pm, Renê Salomão wrote:
$pgsql > createlang plperl template1
ERROR: Load of file /usr/local/postgresql-7.3.2/lib/plperl.so failed:
libperl.so: cannot open shared object file: No such file or directory
I think you need to have Perl installed as a shared-library as well as a
static executable. I don't think it defaults to this, so you'll either need
to recompile, or more likely grab the appropriate RPM/apt-get your package.
--
Richard Huxton
Rene'
I am trying to install PLPERL in Postgresql in order to use
regular expression to eliminate any undesired character in any given
name to be inserted in the database... I believe that using plperl is
less time consuming than doing the same approach using plpgsql
(correct if I am wrong please)...
If you built postgresql from source, you need to recompile it " --with-perl "
If you installed from RPMs, your distribution should have a PG-Perl or
Perl-Postgres RPM; install that.
--
Josh Berkus
Aglio Database Solutions
San Francisco
If you built postgresql from source, you need to recompile it " --with-perl "
If you installed from RPMs, your distribution should have a PG-Perl or
Perl-Postgres RPM; install that.
From his pg_config results, we see that it has been compiled '--with-perl'
option. I am unable to understand why it tries to access libperl.so. Check
whether plperl.so exist in appropriate directory or check where it exist
in that machine and pass appropriate -L option to createlang command.
Moreover, you must pass 'p portnumber' since you have compiled with
different port.
regards,
bhuvaneswaran
Thanks everyone for replying my email,
I have fixed the problem, not sure if it was the right fix!!
When I installed Pg, I did compiled it with "--with-perl" and no
problem to install... Later when I decided to use PLPERL in addition
to plpgsql the problem occured...
What I did was just copy the missing libperl.so from the source code to
/lib... Doing that I was able to createlang PLPERL, and so for no
problem...
Thanks all...