Home
About
Download
Documentation
Community
Developers
Support
Donate
Your account
September 26, 2024:
PostgreSQL 17 Released!
Documentation
→
PostgreSQL 8.4
Supported Versions:
Current
(
17
) /
16
/
15
/
14
/
13
/
12
Development Versions:
devel
Unsupported versions:
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
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the
current
version, or one of the other supported versions listed above instead.
PostgreSQL 8.4.22 Documentation
Prev
Fast Backward
Fast Forward
Next
Chapter 38.
PL/pgSQL
-
SQL
Procedural Language
Table of Contents
38.1.
Overview
38.1.1.
Advantages of Using
PL/pgSQL
38.1.2.
Supported Argument and Result Data Types
38.2.
Structure of
PL/pgSQL
38.3.
Declarations
38.3.1.
Aliases for Function Parameters
38.3.2.
Copying Types
38.3.3.
Row Types
38.3.4.
Record Types
38.3.5.
RENAME
38.4.
Expressions
38.5.
Basic Statements
38.5.1.
Assignment
38.5.2.
Executing a Command With No Result
38.5.3.
Executing a Query with a Single-Row Result
38.5.4.
Executing Dynamic Commands
38.5.5.
Obtaining the Result Status
38.5.6.
Doing Nothing At All
38.6.
Control Structures
38.6.1.
Returning From a Function
38.6.2.
Conditionals
38.6.3.
Simple Loops
38.6.4.
Looping Through Query Results
38.6.5.
Trapping Errors
38.7.
Cursors
38.7.1.
Declaring Cursor Variables
38.7.2.
Opening Cursors
38.7.3.
Using Cursors
38.7.4.
Looping Through a Cursor's Result
38.8.
Errors and Messages
38.9.
Trigger Procedures
38.10.
PL/pgSQL
Under the Hood
38.10.1.
Variable Substitution
38.10.2.
Plan Caching
38.11.
Tips for Developing in
PL/pgSQL
38.12.
Porting from
Oracle
PL/SQL
38.12.1.
Porting Examples
38.12.2.
Other Things to Watch For
38.12.3.
Appendix
Prev
Home
Next
Installing Procedural Languages
Up
Overview