Home
About
Download
Documentation
Community
Developers
Support
Donate
Your account
February 20, 2025:
PostgreSQL 17.4, 16.8, 15.12, 14.17, and 13.20 Released!
Documentation
→
PostgreSQL 17
Supported Versions:
Current
(
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
/
7.1
Chapter 41.
PL/pgSQL
—
SQL
Procedural Language
Prev
Up
Part V. Server Programming
Home
Next
Chapter 41.
PL/pgSQL
—
SQL
Procedural Language
Table of Contents
41.1. Overview
41.1.1. Advantages of Using
PL/pgSQL
41.1.2. Supported Argument and Result Data Types
41.2. Structure of
PL/pgSQL
41.3. Declarations
41.3.1. Declaring Function Parameters
41.3.2.
ALIAS
41.3.3. Copying Types
41.3.4. Row Types
41.3.5. Record Types
41.3.6. Collation of
PL/pgSQL
Variables
41.4. Expressions
41.5. Basic Statements
41.5.1. Assignment
41.5.2. Executing SQL Commands
41.5.3. Executing a Command with a Single-Row Result
41.5.4. Executing Dynamic Commands
41.5.5. Obtaining the Result Status
41.5.6. Doing Nothing At All
41.6. Control Structures
41.6.1. Returning from a Function