Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hMbLX-0001NV-8y for pgsql-general@arkaria.postgresql.org; Fri, 03 May 2019 16:47:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hMbLV-00080W-Ao for pgsql-general@arkaria.postgresql.org; Fri, 03 May 2019 16:47:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hMaYH-00075m-Iv for pgsql-general@lists.postgresql.org; Fri, 03 May 2019 15:56:46 +0000 Received: from mail-eopbgr820081.outbound.protection.outlook.com ([40.107.82.81] helo=NAM01-SN1-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hMaYB-0005nU-9J for pgsql-general@lists.postgresql.org; Fri, 03 May 2019 15:56:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Exponentialinc.onmicrosoft.com; s=selector1-exponential-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=w+N+cJikdS+MV1/7uABf3Aa75O59S1g05nphfSSSZAE=; b=TlG1Av3UjM4/VeBdxfXOL1Hm1Mea3RV+EUM/JlcIsWQB+2MCrNPYYWR3mOmq0F+JbK48JcTRxleQ12mg5svHbmBJd/Ko/ezT4YLpeZxX+1mIUjH2QnmBGe2X74018FmmqT5AdfHuP2yvktTqmqRpqE9TOCEzw4w+ooSHt09TjxE= Received: from BL0PR01MB5187.prod.exchangelabs.com (10.167.235.95) by BL0PR01MB4145.prod.exchangelabs.com (10.167.172.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.13; Fri, 3 May 2019 15:56:36 +0000 Received: from BL0PR01MB5187.prod.exchangelabs.com ([fe80::a180:ae0:a9e:8d4c]) by BL0PR01MB5187.prod.exchangelabs.com ([fe80::a180:ae0:a9e:8d4c%5]) with mapi id 15.20.1856.008; Fri, 3 May 2019 15:56:36 +0000 From: Daulat Ram To: "pgsql-general@lists.postgresql.org" Subject: CREATE EXTENSION to load the language into the database Thread-Topic: CREATE EXTENSION to load the language into the database Thread-Index: AdUByGtF1rqhGW2QRMGI0TGeK1dMAw== Date: Fri, 3 May 2019 15:56:36 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Daulat.Ram@exponential.com; x-originating-ip: [2401:4900:2ee7:8ba3:8de9:3cb6:692a:25f9] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9b050aeb-e4be-40ed-7f54-08d6cfdfec04 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(7193020);SRVR:BL0PR01MB4145; x-ms-traffictypediagnostic: BL0PR01MB4145: x-ms-exchange-purlcount: 2 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0026334A56 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(39850400004)(136003)(346002)(376002)(396003)(189003)(199004)(14444005)(2906002)(6506007)(476003)(256004)(186003)(486006)(46003)(52536014)(14454004)(73956011)(76116006)(66476007)(66556008)(64756008)(66446008)(66946007)(478600001)(99286004)(790700001)(54896002)(6306002)(9686003)(6116002)(33656002)(102836004)(8936002)(6916009)(2501003)(7696005)(5660300002)(81156014)(81166006)(8676002)(5640700003)(2351001)(74316002)(71200400001)(71190400001)(7736002)(6436002)(53936002)(68736007)(86362001)(72206003)(55016002)(316002)(25786009);DIR:OUT;SFP:1101;SCL:1;SRVR:BL0PR01MB4145;H:BL0PR01MB5187.prod.exchangelabs.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: exponential.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: xpIfaA743TBYl6pFOF9qzIjcFvdvSMUGwIU6gsb/EuiE+ATEfGjoidbpNptiIpgLSas9YLe3aj0SStR8Ej03Wgix8Mn6sh1nYVXqKe/VMkh5E6RXVipA87d/IvSr1Rvq7+iGTJQ24br0tn3MNIdQg/RJF6zaDmHqT+e9mPHorke+tBnIHTwoeJqG3pOXrgck9yf9kgZkZ5FCXREqvFvmbRY0w6WxciCYoeFCOwmDLVbTRM3HLJKCZ4LSQYAQ3YmMDC1ELuGURhz7WVDoTUoAw6n8BQk489m4pTrTmbnK+KVzeJORb2/cBNct2Udd3497LrbuIZiZKH76maJkUzdvnwJ68mFV3EEpq0vyhLBs7lQqS5b4/T8a8FueAKWLNTnqJqYhr1oCyOkTYSsdTn+yC7PnKxF3VKtTh7c1o+2LFzo= Content-Type: multipart/alternative; boundary="_000_BL0PR01MB5187121F2D79ACED865088DB9B350BL0PR01MB5187prod_" MIME-Version: 1.0 X-OriginatorOrg: exponential.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9b050aeb-e4be-40ed-7f54-08d6cfdfec04 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 May 2019 15:56:36.2299 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: c1877106-092b-492d-8db3-c9fec130d4fd X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR01MB4145 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_BL0PR01MB5187121F2D79ACED865088DB9B350BL0PR01MB5187prod_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello team, We are getting below issue while creating a function in Potsgres 11.2 nagios=3D# create or replace function diskf (filesystem text, warn int, err= int) returns text as $BODY$ nagios$# use warnings; nagios$# use strict; nagios$# my $fs =3D $_[0]; nagios$# my $w =3D $_[1]; nagios$# my $e =3D $_[2]; nagios$# my $r =3D "WARNING"; nagios$# my $output =3D `df -kP $fs`; nagios$# $output =3D~ /.*\s+(\d+)%.*/; nagios$# $output =3D $1; nagios$# if ($output > $w) nagios$# { $r =3D "ERROR" if $output > $e;} nagios$# else { $r =3D "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=3D# 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 extension= s. nagios=3D# CREATE EXTENSION plperl; ERROR: could not open extension control file "/usr/local/share/postgresql/= extension/plperl.control": No such file or directory nagios=3D# 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=3D# 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=3D# Regards, Dault --_000_BL0PR01MB5187121F2D79ACED865088DB9B350BL0PR01MB5187prod_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello team,

 

We are getting below issue= while creating a function in Potsgres 11.2

 

 

nagios=3D# create or repla= ce function diskf (filesystem text, warn int, err int) returns text as $BOD= Y$

nagios$# use warnings;

nagios$# use strict;<= /o:p>

nagios$# my $fs =3D $_[0];=

nagios$# my $w =3D $_[1];<= o:p>

nagios$# my $e =3D $_[2];<= o:p>

nagios$# my $r =3D "W= ARNING";

nagios$# my $output =3D `d= f -kP $fs`;

nagios$# $output =3D~ /.*\= s+(\d+)%.*/;

nagios$# $output =3D $1;

nagios$# if ($output > = $w)

nagios$# { $r =3D "ER= ROR" if $output > $e;}

nagios$# else { $r =3D &qu= ot;OK";}

nagios$# return  &quo= t;$r $output";

nagios$# $BODY$ language p= lperlu;

 

ERROR:  language "plperlu" does not exist<= /o:p>

HINT:  Use CREATE EXTENSION to load the language into the= database.

 

 

nagios=3D# SELECT * FROM p= g_language;

lanname  | lanowner |= lanispl | lanpltrusted | lanplcallfoid | laninline | lanvalidator | lanacl=

----------+----------&= #43;---------+--------------+---------------+-----------+--= ------------+--------

internal |  &nbs= p;    10 | f       | f &n= bsp;          |  &nb= sp;          0 |  &n= bsp;      0 |      &= nbsp;  2246 |

c    &= nbsp;   |       10 | f  &= nbsp;    | f        =     |         &= nbsp;   0 |         0 |&n= bsp;        2247 |

sql    = ;  |       10 | f    = ;   | t         &nbs= p;  |           = ;  0 |         0 |  =        2248 |

plpgsql  |  = ;     10 | t       | t&nb= sp;           | &nbs= p;       13075 |     1307= 6 |        13077 |

(4 rows)=

 

To solve this issue , I am getting the below warnings if creat= ing extensions.

 

nagios=3D# CREATE EXTENSIO= N plperl;

ERROR:  could not ope= n extension control file "/usr/local/share/postgresql/extension/plperl= .control": No such file or directory

nagios=3D# CREATE LANGUAGE= plperlu;

ERROR:  could not loa= d library "/usr/local/lib/postgresql/plperl.so": Error loading sh= ared library libperl.so.5.20: No such file or directory (needed by /usr/local/lib/postgresql/plperl.so)

nagios=3D# CREATE LANGUAGE= plperlu;

ERROR:  could not loa= d library "/usr/local/lib/postgresql/plperl.so": Error loading sh= ared library libperl.so.5.20: No such file or directory (needed by /usr/local/lib/postgresql/plperl.so)

nagios=3D#

 

 

Regards,

Dault

--_000_BL0PR01MB5187121F2D79ACED865088DB9B350BL0PR01MB5187prod_--