On Sun July 13 2003 12:08, Umut Destan wrote:
> Hi all,
> Following the instructions Peter Nixon gives in VoIP billing;
> "createlang plperl radius" doesn't seem to succeed. (How important is
> plperl anyway?) I got the postgresql-plperl.rpm package with the same
> version as my postgresql packages (7.1.3-2) Bu when i try to createlang, if
> fails:
> ERROR: Load of file /usr/lib/pgsql/plperl.so failed:
> /usr/lib/perl5/5.00503/i386-linux/auto/Opcode/Opcode.so cannot open shared
> object file: No such file or directory. Well ofcourse Opcode.so is not
> there because I have Perl 5.6.0 and its in /usr/lib/perl5/5.6.0/.... Is
> something wrong with plperl.so here?
My instructions are tested on SuSE Linux 8.1 and 8.2 with updated Postgres,
perl and postgres module rpms (Some problems I found with the rpms caused new
ones to be released)
You only need plperl if you are planning on writing stored procedures in perl.
I use the following stored procedure:
CREATE OR REPLACE FUNCTION strip_dot (text) returns timestamp AS '
my $datetime = $_[0];
$datetime =~ s/^\\.*//;
return $datetime;
' language 'plperl';
to strip the leading . from the timestamps of Cisco NASes that have
temporarily lost NTP timesync. I probably should rewrite this in Postgres
native language, but I did not know it and did know perl at the time I wrote
this.
If I get a chance tomorrow I will rewrite it before the next FR release.
(My wife tells me as its sunday we are going shopping now :-)
--
Peter Nixon
http://www.peternixon.net/
PGP Key: http://www.peternixon.net/public.asc
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html