pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedCREATE EXTENSION to load the language into the database
4+ messages / 2 participants
[nested] [flat]
* CREATE EXTENSION to load the language into the database
@ 2019-05-03 15:56 Daulat Ram <Daulat.Ram@exponential.com>
2019-05-03 16:50 ` Re: CREATE EXTENSION to load the language into the database Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 1 reply; 4+ messages in thread
From: Daulat Ram @ 2019-05-03 15:56 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: CREATE EXTENSION to load the language into the database
2019-05-03 15:56 CREATE EXTENSION to load the language into the database Daulat Ram <Daulat.Ram@exponential.com>
@ 2019-05-03 16:50 ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-05-03 17:24 ` RE: CREATE EXTENSION to load the language into the database Daulat Ram <Daulat.Ram@exponential.com>
0 siblings, 1 reply; 4+ messages in thread
From: Adrian Klaver @ 2019-05-03 16:50 UTC (permalink / raw)
To: Daulat Ram <Daulat.Ram@exponential.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
On 5/3/19 8:56 AM, Daulat Ram wrote:
> 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)
The plperl(u) extension has not been added to the Postgres installation.
You need to do that. To help you with that we need to know:
What OS(and version) are you using?
How did you install Postgres?
>
> nagios=#
>
> Regards,
>
> Dault
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 4+ messages in thread
* RE: CREATE EXTENSION to load the language into the database
2019-05-03 15:56 CREATE EXTENSION to load the language into the database Daulat Ram <Daulat.Ram@exponential.com>
2019-05-03 16:50 ` Re: CREATE EXTENSION to load the language into the database Adrian Klaver <adrian.klaver@aklaver.com>
@ 2019-05-03 17:24 ` Daulat Ram <Daulat.Ram@exponential.com>
2019-05-03 18:09 ` Re: CREATE EXTENSION to load the language into the database Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 1 reply; 4+ messages in thread
From: Daulat Ram @ 2019-05-03 17:24 UTC (permalink / raw)
To: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Hi Adrian,
Please find the requested details.
What OS(and version) are you using?
Ans:
bash-4.4$ cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.9.2
PRETTY_NAME="Alpine Linux v3.9"
HOME_URL="https://alpinelinux.org/";
BUG_REPORT_URL="https://bugs.alpinelinux.org/";
bash-4.4$
bash-4.4$ uname -a
Linux psql_primary_kbcn 3.10.0-514.16.1.el7.x86_64 #1 SMP Wed Apr 12 15:04:24 UTC 2017 x86_64 Linux
bash-4.4$
How did you install Postgres?
Ans:
We did installation via customized docker image provided by our dev ops team.
Regards,
Daulat
-----Original Message-----
From: Adrian Klaver <adrian.klaver@aklaver.com>
Sent: Friday, May 3, 2019 10:21 PM
To: Daulat Ram <Daulat.Ram@exponential.com>; pgsql-general@lists.postgresql.org
Subject: Re: CREATE EXTENSION to load the language into the database
On 5/3/19 8:56 AM, Daulat Ram wrote:
> 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)
The plperl(u) extension has not been added to the Postgres installation.
You need to do that. To help you with that we need to know:
What OS(and version) are you using?
How did you install Postgres?
>
> nagios=#
>
> Regards,
>
> Dault
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: CREATE EXTENSION to load the language into the database
2019-05-03 15:56 CREATE EXTENSION to load the language into the database Daulat Ram <Daulat.Ram@exponential.com>
2019-05-03 16:50 ` Re: CREATE EXTENSION to load the language into the database Adrian Klaver <adrian.klaver@aklaver.com>
2019-05-03 17:24 ` RE: CREATE EXTENSION to load the language into the database Daulat Ram <Daulat.Ram@exponential.com>
@ 2019-05-03 18:09 ` Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 0 replies; 4+ messages in thread
From: Adrian Klaver @ 2019-05-03 18:09 UTC (permalink / raw)
To: Daulat Ram <Daulat.Ram@exponential.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
On 5/3/19 10:24 AM, Daulat Ram wrote:
> Hi Adrian,
>
> Please find the requested details.
>
> What OS(and version) are you using?
> Ans:
> bash-4.4$ cat /etc/os-release
> NAME="Alpine Linux"
> ID=alpine
> VERSION_ID=3.9.2
> PRETTY_NAME="Alpine Linux v3.9"
> HOME_URL="https://alpinelinux.org/";
> BUG_REPORT_URL="https://bugs.alpinelinux.org/";
> bash-4.4$
>
>
> bash-4.4$ uname -a
> Linux psql_primary_kbcn 3.10.0-514.16.1.el7.x86_64 #1 SMP Wed Apr 12 15:04:24 UTC 2017 x86_64 Linux
> bash-4.4$
>
>
> How did you install Postgres?
>
> Ans:
>
> We did installation via customized docker image provided by our dev ops team.
Well in the image they need to make the plperl language available. If
they are building from source then it needs to be compiled with:
https://www.postgresql.org/docs/11/install-procedure.html
--with-perl
Build the PL/Perl server-side language.
If they are using packages then they will need to include the
appropriate package.
>
> Regards,
> Daulat
>
>
> -----Original Message-----
> From: Adrian Klaver <adrian.klaver@aklaver.com>
> Sent: Friday, May 3, 2019 10:21 PM
> To: Daulat Ram <Daulat.Ram@exponential.com>; pgsql-general@lists.postgresql.org
> Subject: Re: CREATE EXTENSION to load the language into the database
>
> On 5/3/19 8:56 AM, Daulat Ram wrote:
>> 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)
>
> The plperl(u) extension has not been added to the Postgres installation.
> You need to do that. To help you with that we need to know:
>
> What OS(and version) are you using?
>
> How did you install Postgres?
>
>>
>> nagios=#
>>
>> Regards,
>>
>> Dault
>>
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2019-05-03 18:09 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-05-03 15:56 CREATE EXTENSION to load the language into the database Daulat Ram <Daulat.Ram@exponential.com>
2019-05-03 16:50 ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-05-03 17:24 ` Daulat Ram <Daulat.Ram@exponential.com>
2019-05-03 18:09 ` Adrian Klaver <adrian.klaver@aklaver.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox