Movatterモバイル変換


[0]ホーム

URL:


September 25, 2025: PostgreSQL 18 Released!
Supported Versions:Current (18) /17 /16 /15 /14 /13
Development Versions:devel
Unsupported versions:12 /11 /10 /9.6 /9.5 /9.4 /9.3 /9.2 /9.1 /9.0 /8.4 /8.3 /8.2 /8.1 /8.0 /7.4 /7.3 /7.2
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for thecurrent version, or one of the other supported versions listed above instead.
PostgreSQL 7.2.8 Documentation
PrevNext

Chapter 26. PL/Python - Python Procedural Language

Table of Contents
26.1.Introduction
26.2.Installation
26.3.Using PL/Python

26.1. Introduction

ThePL/Python procedural language allowsPostgreSQL functions to be written in thePython language.

The current version ofPL/Python functions as a trusted language only; access to the file system and other local resources is disabled. Specifically,PL/Python uses the Python restricted execution environment, further restricts it to prevent the use of the fileopen call, and allows only modules from a specific list to be imported. Presently, that list includes: array, bisect, binascii, calendar, cmath, codecs, errno, marshal, math, md5, mpz, operator, pcre, pickle, random, re, regex, sre, sha, string, StringIO, struct, time, whrandom, and zlib.

In the current version, any database error encountered while running aPL/Python function will result in the immediate termination of that function by the server. It is not possible to trap error conditions using Pythontry ... catch constructs. For example, a syntax error in an SQL statement passed to theplpy.execute() call will terminate the function. This behavior may be changed in a future release.


PrevHomeNext
DescriptionUpInstallation

[8]ページ先頭

©2009-2025 Movatter.jp