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
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.0.26 Documentation

The PostgreSQL Global Development Group


Table of Contents
Preface
What is PostgreSQL?
A Brief History of PostgreSQL
Conventions
Further Information
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. Client-Only 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. ECPG - Embedded SQL in C
30. The Information Schema
V. Server Programming
31. Extending SQL
32. Triggers
33. The Rule System
34. Procedural Languages
35. PL/pgSQL - SQL Procedural Language
36. PL/Tcl - Tcl Procedural Language
37. PL/Perl - Perl Procedural Language
38. PL/Python - Python Procedural Language
39. Server Programming Interface
VI. Reference
I. SQL Commands
II. PostgreSQL Client Applications
III. PostgreSQL Server Applications
VII. Internals
40. Overview of PostgreSQL Internals
41. System Catalogs
42. Frontend/Backend Protocol
43. PostgreSQL Coding Conventions
44. Native Language Support
45. Writing A Procedural Language Handler
46. Genetic Query Optimizer
47. Index Cost Estimation Functions
48. GiST Indexes
49. Database Physical Storage
50. BKI Backend Interface
VIII. Appendixes
A. PostgreSQL Error Codes
B. Date/Time Support
C. SQL Key Words
D. SQL Conformance
E. Release Notes
F. The Source Code Repository
G. Documentation
H. External Projects
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. Mathematical Functions
9-4. Trigonometric Functions
9-5. SQL String Functions and Operators
9-6. Other String Functions
9-7. Built-in Conversions
9-8. SQL Binary String Functions and Operators
9-9. Other Binary String Functions
9-10. Bit String Operators
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. array Operators
9-36. array Functions
9-37. Aggregate Functions
9-38. Series Generating Functions
9-39. Session Information Functions
9-40. Access Privilege Inquiry Functions
9-41. Schema Visibility Inquiry Functions
9-42. System Catalog Information Functions
9-43. Comment Information Functions
9-44. Configuration Settings Functions
9-45. Backend Signalling Functions
9-46. Backup Control Functions
12-1. SQL Transaction Isolation Levels
16-1. Short option key
16-2. 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
30-1. information_schema_catalog_name Columns
30-2. applicable_roles Columns
30-3. check_constraints Columns
30-4. column_domain_usage Columns
30-5. column_privileges Columns
30-6. column_udt_usage Columns
30-7. columns Columns
30-8. constraint_column_usage Columns
30-9. constraint_table_usage Columns
30-10. data_type_privileges Columns
30-11. domain_constraints Columns
30-12. domain_udt_usage Columns
30-13. domains Columns
30-14. element_types Columns
30-15. enabled_roles Columns
30-16. key_column_usage Columns
30-17. parameters Columns
30-18. referential_constraints Columns
30-19. role_column_grants Columns
30-20. role_routine_grants Columns
30-21. role_table_grants Columns
30-22. role_usage_grants Columns
30-23. routine_privileges Columns
30-24. routines Columns
30-25. schemata Columns
30-26. sql_features Columns
30-27. sql_implementation_info Columns
30-28. sql_languages Columns
30-29. sql_packages Columns
30-30. sql_sizing Columns
30-31. sql_sizing_profiles Columns
30-32. table_constraints Columns
30-33. table_privileges Columns
30-34. tables Columns
30-35. triggers Columns
30-36. usage_privileges Columns
30-37. view_column_usage Columns
30-38. view_table_usage Columns
30-39. views Columns
31-1. Equivalent C Types for Built-In SQL Types
31-2. B-tree Strategies
31-3. Hash Strategies
31-4. R-tree Strategies
31-5. B-tree Support Functions
31-6. Hash Support Functions
31-7. R-tree Support Functions
31-8. GiST Support Functions
41-1. System Catalogs
41-2. pg_aggregate Columns
41-3. pg_am Columns
41-4. pg_amop Columns
41-5. pg_amproc Columns
41-6. pg_attrdef Columns
41-7. pg_attribute Columns
41-8. pg_cast Columns
41-9. pg_class Columns
41-10. pg_constraint Columns
41-11. pg_conversion Columns
41-12. pg_database Columns
41-13. pg_depend Columns
41-14. pg_description Columns
41-15. pg_group Columns
41-16. pg_index Columns
41-17. pg_inherits Columns
41-18. pg_language Columns
41-19. pg_largeobject Columns
41-20. pg_listener Columns
41-21. pg_namespace Columns
41-22. pg_opclass Columns
41-23. pg_operator Columns
41-24. pg_proc Columns
41-25. pg_rewrite Columns
41-26. pg_shadow Columns
41-27. pg_statistic Columns
41-28. pg_tablespace Columns
41-29. pg_trigger Columns
41-30. pg_type Columns
41-31. System Views
41-32. pg_indexes Columns
41-33. pg_locks Columns
41-34. pg_rules Columns
41-35. pg_settings Columns
41-36. pg_stats Columns
41-37. pg_tables Columns
41-38. pg_user Columns
41-39. pg_views Columns
49-1. Contents of PGDATA
49-2. Overall Page Layout
49-3. PageHeaderData Layout
49-4. HeapTupleHeaderData Layout
A-1. PostgreSQL Error Codes
B-1. Month Names
B-2. Day of the Week Names
B-3. Date/Time Field Modifiers
B-4. Time Zone Abbreviations for Input
B-5. Australian Time Zone Abbreviations for Input
B-6. Time Zone Names for Setting timezone
C-1. SQL Key Words