↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / Procedural Languages / PL/Perl

plperl

PL/Perl procedural language

Reading PostgreSQL 18.6.

Description

PL/Perl procedural language

Kind
Bundled procedural-language variant
Family
PL/Perl
Trusted
t
Handler
plperl_call_handler
Inline handler
plperl_inline_handler
Validator
plperl_validator
Library
$libdir/plperl
Default version
1.0
Module pathname
$libdir/plperl
Comment
PL/Perl procedural language

Installation definition from the matching source archive

This extension is shipped with the source. Its presence does not establish that the language or external runtime is installed.

/* src/pl/plperl/plperl--1.0.sql */

CREATE FUNCTION plperl_call_handler() RETURNS language_handler
  LANGUAGE c AS 'MODULE_PATHNAME';

CREATE FUNCTION plperl_inline_handler(internal) RETURNS void
  STRICT LANGUAGE c AS 'MODULE_PATHNAME';

CREATE FUNCTION plperl_validator(oid) RETURNS void
  STRICT LANGUAGE c AS 'MODULE_PATHNAME';

CREATE TRUSTED LANGUAGE plperl
  HANDLER plperl_call_handler
  INLINE plperl_inline_handler
  VALIDATOR plperl_validator;

-- The language object, but not the functions, can be owned by a non-superuser.
ALTER LANGUAGE plperl OWNER TO @extowner@;

COMMENT ON LANGUAGE plperl IS 'PL/Perl procedural language';

Manual definition

Chapter 43. PL/Perl — Perl Procedural Language

PL/Perl is a loadable procedural language that enables you to write PostgreSQL functions and procedures in the Perl programming language.

The main advantage to using PL/Perl is that this allows use, within stored functions and procedures, of the manyfold “string munging” operators and functions available for Perl. Parsing complex strings might be easier using Perl than it is with the string functions and control structures provided in PL/pgSQL.

To install PL/Perl in a particular database, use CREATE EXTENSION plperl.

Tip

If a language is installed into template1, all subsequently created databases will have the language installed automatically.

Note

Users of source packages must specially enable the build of PL/Perl during the installation process. (Refer to Chapter 17 for more information.) Users of binary packages might find PL/Perl in a separate subpackage.

Related entries

Documentation and source

Source build
Version
18.6
Build
https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2
Source fingerprint
555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f

Compare versions

PostgreSQL 17 → 18: unchanged.

Compares recorded interfaces and attributes. Source fingerprints and build metadata are excluded; an absent sample is not proof of the introduction or removal release.

Related entries

Export JSON · Back to Procedural Languages · Recorded in PostgreSQL 10 through 20; the first sample is not necessarily its introduction.