]> begriffs open source - ai-pg/blob - full-docs/txt/plpgsql.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / plpgsql.txt
1
2 Chapter 41. PL/pgSQL — SQL Procedural Language
3
4    Table of Contents
5
6    41.1. Overview
7
8         41.1.1. Advantages of Using PL/pgSQL
9         41.1.2. Supported Argument and Result Data Types
10
11    41.2. Structure of PL/pgSQL
12    41.3. Declarations
13
14         41.3.1. Declaring Function Parameters
15         41.3.2. ALIAS
16         41.3.3. Copying Types
17         41.3.4. Row Types
18         41.3.5. Record Types
19         41.3.6. Collation of PL/pgSQL Variables
20
21    41.4. Expressions
22    41.5. Basic Statements
23
24         41.5.1. Assignment
25         41.5.2. Executing SQL Commands
26         41.5.3. Executing a Command with a Single-Row Result
27         41.5.4. Executing Dynamic Commands
28         41.5.5. Obtaining the Result Status
29         41.5.6. Doing Nothing At All
30
31    41.6. Control Structures
32
33         41.6.1. Returning from a Function
34         41.6.2. Returning from a Procedure
35         41.6.3. Calling a Procedure
36         41.6.4. Conditionals
37         41.6.5. Simple Loops
38         41.6.6. Looping through Query Results
39         41.6.7. Looping through Arrays
40         41.6.8. Trapping Errors
41         41.6.9. Obtaining Execution Location Information
42
43    41.7. Cursors
44
45         41.7.1. Declaring Cursor Variables
46         41.7.2. Opening Cursors
47         41.7.3. Using Cursors
48         41.7.4. Looping through a Cursor's Result
49
50    41.8. Transaction Management
51    41.9. Errors and Messages
52
53         41.9.1. Reporting Errors and Messages
54         41.9.2. Checking Assertions
55
56    41.10. Trigger Functions
57
58         41.10.1. Triggers on Data Changes
59         41.10.2. Triggers on Events
60
61    41.11. PL/pgSQL under the Hood
62
63         41.11.1. Variable Substitution
64         41.11.2. Plan Caching
65
66    41.12. Tips for Developing in PL/pgSQL
67
68         41.12.1. Handling of Quotation Marks
69         41.12.2. Additional Compile-Time and Run-Time Checks
70
71    41.13. Porting from Oracle PL/SQL
72
73         41.13.1. Porting Examples
74         41.13.2. Other Things to Watch For
75         41.13.3. Appendix