Hello team, We are getting below issue while creating a function in Potsgres 11.2 nagios=# create or replace function diskf (filesystem text, warn int, err int) returns text as $BODY$ nagios$# use warnings; nagios$# use strict; nagios$# my $fs = $_[0]; nagios$# my $w = $_[1]; nagios$# my $e = $_[2]; nagios$# my $r = "WARNING"; nagios$# my $output = `df -kP $fs`; nagios$# $output =~ /.*\s+(\d+)%.*/; nagios$# $output = $1; nagios$# if ($output > $w) nagios$# { $r = "ERROR" if $output > $e;} nagios$# else { $r = "OK";} nagios$# return "$r $output"; nagios$# $BODY$ language plperlu; ERROR: language "plperlu" does not exist HINT: Use CREATE EXTENSION to load the language into the database. nagios=# SELECT * FROM pg_language; lanname | lanowner | lanispl | lanpltrusted | lanplcallfoid | laninline | lanvalidator | lanacl ----------+----------+---------+--------------+---------------+-----------+--------------+-------- internal | 10 | f | f | 0 | 0 | 2246 | c | 10 | f | f | 0 | 0 | 2247 | sql | 10 | f | t | 0 | 0 | 2248 | plpgsql | 10 | t | t | 13075 | 13076 | 13077 | (4 rows) To solve this issue , I am getting the below warnings if creating extensions. nagios=# CREATE EXTENSION plperl; ERROR: could not open extension control file "/usr/local/share/postgresql/extension/plperl.control": No such file or directory nagios=# CREATE LANGUAGE plperlu; ERROR: could not load library "/usr/local/lib/postgresql/plperl.so": Error loading shared library libperl.so.5.20: No such file or directory (needed
by /usr/local/lib/postgresql/plperl.so) nagios=# CREATE LANGUAGE plperlu; ERROR: could not load library "/usr/local/lib/postgresql/plperl.so": Error loading shared library libperl.so.5.20: No such file or directory (needed
by /usr/local/lib/postgresql/plperl.so) nagios=# Regards, Dault |