PostgreSQL 7.4devel Documentation

The PostgreSQL Global Development Group


Table of Contents
Preface
1. What is PostgreSQL?
2. A Brief History of PostgreSQL
3. Terminology and Notation
4. Bug Reporting Guidelines
I. Tutorial
1. Getting Started
2. The SQL Language
3. Advanced Features
II. The SQL Language
4. SQL Syntax
5. Data Definition
6. Data Manipulation
7. Queries
8. Data Types
9. Functions and Operators
10. Type Conversion
11. Indexes
12. Concurrency Control
13. Performance Tips
III. Server Administration
14. Installation Instructions
15. Installation on Windows
16. Server Run-time Environment
17. Database Users and Privileges
18. Managing Databases
19. Client Authentication
20. Localization
21. Routine Database Maintenance Tasks
22. Backup and Restore
23. Monitoring Database Activity
24. Monitoring Disk Usage
25. Write-Ahead Logging (WAL)
26. Regression Tests
IV. Client Interfaces
27. libpq - C Library
28. Large Objects
29. pgtcl - Tcl Binding Library
30. ECPG - Embedded SQL in C
31. JDBC Interface
32. PyGreSQL - Python Interface
V. Server Programming
33. Extending SQL
34. Index Cost Estimation Functions
35. The Rule System
36. Triggers
37. Server Programming Interface
38. Procedural Languages
39. PL/pgSQL - SQL Procedural Language
40. PL/Tcl - Tcl Procedural Language
41. PL/Perl - Perl Procedural Language
42. PL/Python - Python Procedural Language
VI. Reference
I. SQL Commands
II. PostgreSQL Client Applications
III. PostgreSQL Server Applications
VII. Internals
43. PostgreSQL Source Code
44. Overview of PostgreSQL Internals
45. System Catalogs
46. Frontend/Backend Protocol
47. gcc Default Optimizations
48. BKI Backend Interface
49. Page Files
50. Genetic Query Optimization
51. GiST Indexes
52. Native Language Support
VIII. Appendixes
A. Date/Time Support
B. SQL Key Words
C. SQL Conformance
D. Release Notes
E. The CVS Repository
F. Documentation
Bibliography
Index
List of Tables
4-1. Operator Precedence (decreasing)
8-1. Data Types
8-2. Numeric Types
8-3. Monetary Types
8-4. Character Types
8-5. Special Character Types
8-6. Binary Data Types
8-7. bytea Literal Escaped Octets
8-8. bytea Output Escaped Octets
8-9. Date/Time Types
8-10. Date Input
8-11. Time Input
8-12. Time Zone Input
8-13. Special Date/Time Inputs
8-14. Date/Time Output Styles
8-15. Date Order Conventions
8-16. Geometric Types
8-17. Network Address Types
8-18. cidr Type Input Examples
8-19. Object Identifier Types
8-20. Pseudo-Types
9-1. Comparison Operators
9-2. Mathematical Operators
9-3. Bit String Bitwise Operators
9-4. Mathematical Functions
9-5. Trigonometric Functions
9-6. SQL String Functions and Operators
9-7. Other String Functions
9-8. Built-in Conversions
9-9. SQL Binary String Functions and Operators
9-10. Other Binary String Functions
9-11. Regular Expression Match Operators
9-12. Regular Expression Atoms
9-13. Regular Expression Quantifiers
9-14. Regular Expression Constraints
9-15. Regular Expression Character-Entry Escapes
9-16. Regular Expression Class-Shorthand Escapes
9-17. Regular Expression Constraint Escapes
9-18. Regular Expression Back References
9-19. ARE Embedded-Option Letters
9-20. Formatting Functions
9-21. Template Patterns for Date/Time Formatting
9-22. Template Pattern Modifiers for Date/Time Formatting
9-23. Template Patterns for Numeric Formatting
9-24. to_char Examples
9-25. Date/Time Operators
9-26. Date/Time Functions
9-27. AT TIME ZONE Variants
9-28. Geometric Operators
9-29. Geometric Functions
9-30. Geometric Type Conversion Functions
9-31. cidr and inet Operators
9-32. cidr and inet Functions
9-33. macaddr Functions
9-34. Sequence Functions
9-35. Session Information Functions
9-36. Configuration Settings Functions
9-37. Access Privilege Inquiry Functions
9-38. Schema Visibility Inquiry Functions
9-39. System Catalog Information Functions
9-40. Comment Information Functions
9-41. Aggregate Functions
12-1. SQL Transaction Isolation Levels
13-1. pg_stats Columns
16-1. pg_settings Columns
16-2. Short option key
16-3. System V IPC parameters
20-1. Server Character Sets
20-2. Client/Server Character Set Conversions
23-1. Standard Statistics Views
23-2. Statistics Access Functions
23-3. pg_locks Columns
29-1. pgtcl Commands
31-1. ConnectionPoolDataSource Implementations
31-2. ConnectionPoolDataSource Configuration Properties
31-3. DataSource Implementations
31-4. DataSource Configuration Properties
31-5. Additional Pooling DataSource Configuration Properties
33-1. Equivalent C Types for Built-In SQL Types
33-2. B-tree Strategies
33-3. Hash Strategies
33-4. R-tree Strategies
33-5. B-tree Support Functions
33-6. Hash Support Functions
33-7. R-tree Support Functions
33-8. GiST Support Functions
45-1. System Catalogs
45-2. pg_aggregate Columns
45-3. pg_am Columns
45-4. pg_amop Columns
45-5. pg_amproc Columns
45-6. pg_attrdef Columns
45-7. pg_attribute Columns
45-8. pg_cast Columns
45-9. pg_class Columns
45-10. pg_constraint Columns
45-11. pg_conversion Columns
45-12. pg_database Columns
45-13. pg_depend Columns
45-14. pg_description Columns
45-15. pg_group Columns
45-16. pg_index Columns
45-17. pg_inherits Columns
45-18. pg_language Columns
45-19. pg_largeobject Columns
45-20. pg_listener Columns
45-21. pg_namespace Columns
45-22. pg_opclass Columns
45-23. pg_operator Columns
45-24. pg_proc Columns
45-25. pg_rewrite Columns
45-26. pg_shadow Columns
45-27. pg_statistic Columns
45-28. pg_trigger Columns
45-29. pg_type Columns
49-1. Sample Page Layout
49-2. PageHeaderData Layout
49-3. HeapTupleHeaderData Layout
A-1. Month Abbreviations
A-2. Day of the Week Abbreviations
A-3. Date/Time Field Modifiers
A-4. Time Zone Abbreviations
A-5. Australian Time Zone Abbreviations
B-1. SQL Key Words
F-1. Indent Formatting for Table of Contents
List of Figures
50-1. Structured Diagram of a Genetic Algorithm
List of Examples
8-1. Using the character types
8-2. Using the boolean type
8-3. Using the bit string types
10-1. Exponentiation Operator Type Resolution
10-2. String Concatenation Operator Type Resolution
10-3. Absolute-Value and Factorial Operator Type Resolution
10-4. Rounding Function Argument Type Resolution
10-5. Substring Function Type Resolution
10-6. character Storage Type Conversion
10-7. Type Resolution with Underspecified Types in a Union
10-8. Type Resolution in a Simple Union
10-9. Type Resolution in a Transposed Union
11-1. Setting up a Partial Index to Exclude Common Values
11-2. Setting up a Partial Index to Exclude Uninteresting Values
11-3. Setting up a Partial Unique Index
19-1. An example pg_hba.conf file
19-2. An example pg_ident.conf file
27-1. libpq Example Program 1
27-2. libpq Example Program 2
27-3. libpq Example Program 3
28-1. Large Objects with libpq Example Program
29-1. pgtcl Example Program
31-1. Processing a Simple Query in JDBC
31-2. Deleting Rows in JDBC
31-3. Dropping a Table in JDBC
31-4. Processing Binary Data in JDBC
31-5. DataSource Code Example
31-6. DataSource JNDI Code Example
38-1. Manual Installation of PL/pgSQL
39-1. A PL/pgSQL Trigger Procedure
39-2. Porting a Simple Function from PL/SQL to PL/pgSQL
39-3. Porting a Function that Creates Another Function from PL/SQL to PL/pgSQL
39-4. Porting a Procedure With String Manipulation and OUT Parameters from PL/SQL to PL/pgSQL
39-5. Porting a Procedure from PL/SQL to PL/pgSQL
44-1. A Simple Select