Postgresql 中文操作指南
Chapter 45. PL/Perl — Perl Procedural Language
Table of Contents
PL/Perl 是一种可加载的过程语言,它使你能够在 Perl programming language 中编写 PostgreSQL 函数和过程。
PL/Perl is a loadable procedural language that enables you to write PostgreSQL functions and procedures in the Perl programming language.
使用 PL/Perl 的主要优势在于,在存储函数和过程中,它允许使用 Perl 中可用的多种“字符串修改”运算符和函数。使用 Perl 解析复杂字符串可能比使用 PL/pgSQL 中提供的字符串函数和控制结构更容易。
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.
要安装特定数据库中的 PL/Perl,请使用 CREATE EXTENSION plperl 。
To install PL/Perl in a particular database, use CREATE EXTENSION plperl.
Tip
如果将语言安装到 template1 中,则随后创建的所有数据库都将自动安装此语言。
If a language is installed into template1, all subsequently created databases will have the language installed automatically.
Note
源包的用户必须在安装过程中专门启用 PL/Perl 的构建。(参考 Chapter 17 以获取更多信息。)二进制包的用户可能在单独的子包中找到 PL/Perl。
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.