Lists: | pgsql-generalpgsql-novice |
---|
From: | Renê Salomão <rene(at)ibiz(dot)com(dot)br> |
---|---|
To: | pgsql-general(at)postgresql(dot)org, pgsql-novice(at)postgresql(dot)org |
Subject: | Installing PlPerl |
Date: | 2003-05-21 16:26:35 |
Message-ID: | 20030521132635.016cab1a.rene@ibiz.com.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-novice |
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...
From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Renê Salomão <rene(at)ibiz(dot)com(dot)br>, pgsql-general(at)postgresql(dot)org, pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Installing PlPerl |
Date: | 2003-05-21 18:12:36 |
Message-ID: | 200305211912.36102.dev@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-novice |
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
From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | Renê Salomão <rene(at)ibiz(dot)com(dot)br>, pgsql-general(at)postgresql(dot)org, pgsql-novice(at)postgresql(dot)org |
Subject: | Re: [NOVICE] Installing PlPerl |
Date: | 2003-05-22 03:31:42 |
Message-ID: | 200305212031.42899.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-novice |
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
From: | "A(dot)Bhuvaneswaran" <bhuvan(at)symonds(dot)net> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | Renê Salomão <rene(at)ibiz(dot)com(dot)br>, <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Installing PlPerl |
Date: | 2003-05-22 09:11:29 |
Message-ID: | Pine.LNX.4.44.0305221436240.2584-100000@Bhuvan.bksys.co.in |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-novice |
> 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
From: | Renê Salomão <rene(at)ibiz(dot)com(dot)br> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Installing PlPerl |
Date: | 2003-05-22 16:38:38 |
Message-ID: | 20030522133838.1938f32e.rene@ibiz.com.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-novice |
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...