Spring
Postgresql 中文操作指南
    • Preface
      • 1. What Is PostgreSQL?
      • 2. A Brief History of PostgreSQL
        • 2.1. The Berkeley POSTGRES Project
        • 2.2. Postgres95
        • 2.3. PostgreSQL
      • 3. Conventions
      • 4. Further Information
      • 5. Bug Reporting Guidelines
        • 5.1. Identifying Bugs
        • 5.2. What to Report
        • 5.3. Where to Report Bugs
    • 1. What Is PostgreSQL?
    • 2. A Brief History of PostgreSQL
      • 2.1. The Berkeley POSTGRES Project
      • 2.2. Postgres95
      • 2.3. PostgreSQL
    • 3. Conventions
    • 4. Further Information
    • 5. Bug Reporting Guidelines
      • 5.1. Identifying Bugs
      • 5.2. What to Report
      • 5.3. Where to Report Bugs
    • I. Tutorial
      • 1. Getting Started
        • 1.1. Installation
        • 1.2. Architectural Fundamentals
        • 1.3. Creating a Database
        • 1.4. Accessing a Database
      • 2. The SQL Language
        • 2.1. Introduction
        • 2.2. Concepts
        • 2.3. Creating a New Table
        • 2.4. Populating a Table With Rows
        • 2.5. Querying a Table
        • 2.6. Joins Between Tables
        • 2.7. Aggregate Functions
        • 2.8. Updates
        • 2.9. Deletions
      • 3. Advanced Features
        • 3.1. Introduction
        • 3.2. Views
        • 3.3. Foreign Keys
        • 3.4. Transactions
        • 3.5. Window Functions
        • 3.6. Inheritance
        • 3.7. Conclusion
    • 1. Getting Started
      • 1.1. Installation
      • 1.2. Architectural Fundamentals
      • 1.3. Creating a Database
      • 1.4. Accessing a Database
    • 2. The SQL Language
      • 2.1. Introduction
      • 2.2. Concepts
      • 2.3. Creating a New Table
      • 2.4. Populating a Table With Rows
      • 2.5. Querying a Table
      • 2.6. Joins Between Tables
      • 2.7. Aggregate Functions
      • 2.8. Updates
      • 2.9. Deletions
    • 3. Advanced Features
      • 3.1. Introduction
      • 3.2. Views
      • 3.3. Foreign Keys
      • 3.4. Transactions
      • 3.5. Window Functions
      • 3.6. Inheritance
      • 3.7. Conclusion
    • II. The SQL Language
      • 4. SQL Syntax
        • 4.1. Lexical Structure
        • 4.2. Value Expressions
        • 4.3. Calling Functions
      • 5. Data Definition
        • 5.1. Table Basics
        • 5.2. Default Values
        • 5.3. Generated Columns
        • 5.4. Constraints
        • 5.5. System Columns
        • 5.6. Modifying Tables
        • 5.7. Privileges
        • 5.8. Row Security Policies
        • 5.9. Schemas
        • 5.10. Inheritance
        • 5.11. Table Partitioning
        • 5.12. Foreign Data
        • 5.13. Other Database Objects
        • 5.14. Dependency Tracking
      • 6. Data Manipulation
        • 6.1. Inserting Data
        • 6.2. Updating Data
        • 6.3. Deleting Data
        • 6.4. Returning Data from Modified Rows
      • 7. Queries
        • 7.1. Overview
        • 7.2. Table Expressions
        • 7.3. Select Lists
        • 7.4. Combining Queries (UNION, INTERSECT, EXCEPT)
        • 7.5. Sorting Rows (ORDER BY)
        • 7.6. LIMIT and OFFSET
        • 7.7. VALUES Lists
        • 7.8. WITH Queries (Common Table Expressions)
      • 8. Data Types
        • 8.1. Numeric Types
        • 8.2. Monetary Types
        • 8.3. Character Types
        • 8.4. Binary Data Types
        • 8.5. Date/Time Types
        • 8.6. Boolean Type
        • 8.7. Enumerated Types
        • 8.8. Geometric Types
        • 8.9. Network Address Types
        • 8.10. Bit String Types
        • 8.11. Text Search Types
        • 8.12. UUID Type
        • 8.13. XML Type
        • 8.14. JSON Types
        • 8.15. Arrays
        • 8.16. Composite Types
        • 8.17. Range Types
        • 8.18. Domain Types
        • 8.19. Object Identifier Types
        • 8.20. pg_lsn Type
        • 8.21. Pseudo-Types
      • 9. Functions and Operators
        • 9.1. Logical Operators
        • 9.2. Comparison Functions and Operators
        • 9.3. Mathematical Functions and Operators
        • 9.4. String Functions and Operators
        • 9.5. Binary String Functions and Operators
        • 9.6. Bit String Functions and Operators
        • 9.7. Pattern Matching
        • 9.8. Data Type Formatting Functions
        • 9.9. Date/Time Functions and Operators
        • 9.10. Enum Support Functions
        • 9.11. Geometric Functions and Operators
        • 9.12. Network Address Functions and Operators
        • 9.13. Text Search Functions and Operators
        • 9.14. UUID Functions
        • 9.15. XML Functions
        • 9.16. JSON Functions and Operators
        • 9.17. Sequence Manipulation Functions
        • 9.18. Conditional Expressions
        • 9.19. Array Functions and Operators
        • 9.20. Range/Multirange Functions and Operators
        • 9.21. Aggregate Functions
        • 9.22. Window Functions
        • 9.23. Subquery Expressions
        • 9.24. Row and Array Comparisons
        • 9.25. Set Returning Functions
        • 9.26. System Information Functions and Operators
        • 9.27. System Administration Functions
        • 9.28. Trigger Functions
        • 9.29. Event Trigger Functions
        • 9.30. Statistics Information Functions
      • 10. Type Conversion
        • 10.1. Overview
        • 10.2. Operators
        • 10.3. Functions
        • 10.4. Value Storage
        • 10.5. UNION, CASE, and Related Constructs
        • 10.6. SELECT Output Columns
      • 11. Indexes
        • 11.1. Introduction
        • 11.2. Index Types
        • 11.3. Multicolumn Indexes
        • 11.4. Indexes and ORDER BY
        • 11.5. Combining Multiple Indexes
        • 11.6. Unique Indexes
        • 11.7. Indexes on Expressions
        • 11.8. Partial Indexes
        • 11.9. Index-Only Scans and Covering Indexes
        • 11.10. Operator Classes and Operator Families
        • 11.11. Indexes and Collations
        • 11.12. Examining Index Usage
      • 12. Full Text Search
        • 12.1. Introduction
        • 12.2. Tables and Indexes
        • 12.3. Controlling Text Search
        • 12.4. Additional Features
        • 12.5. Parsers
        • 12.6. Dictionaries
        • 12.7. Configuration Example
        • 12.8. Testing and Debugging Text Search
        • 12.9. Preferred Index Types for Text Search
        • 12.10. psql Support
        • 12.11. Limitations
      • 13. Concurrency Control
        • 13.1. Introduction
        • 13.2. Transaction Isolation
        • 13.3. Explicit Locking
        • 13.4. Data Consistency Checks at the Application Level
        • 13.5. Serialization Failure Handling
        • 13.6. Caveats
        • 13.7. Locking and Indexes
      • 14. Performance Tips
        • 14.1. Using EXPLAIN
        • 14.2. Statistics Used by the Planner
        • 14.3. Controlling the Planner with Explicit JOIN Clauses
        • 14.4. Populating a Database
        • 14.5. Non-Durable Settings
      • 15. Parallel Query
        • 15.1. How Parallel Query Works
        • 15.2. When Can Parallel Query Be Used?
        • 15.3. Parallel Plans
        • 15.4. Parallel Safety
    • 4. SQL Syntax
      • 4.1. Lexical Structure
        • 4.1.1. Identifiers and Key Words
        • 4.1.2. Constants
        • 4.1.3. Operators
        • 4.1.4. Special Characters
        • 4.1.5. Comments
        • 4.1.6. Operator Precedence
      • 4.2. Value Expressions
        • 4.2.1. Column References
        • 4.2.2. Positional Parameters
        • 4.2.3. Subscripts
        • 4.2.4. Field Selection
        • 4.2.5. Operator Invocations
        • 4.2.6. Function Calls
        • 4.2.7. Aggregate Expressions
        • 4.2.8. Window Function Calls
        • 4.2.9. Type Casts
        • 4.2.10. Collation Expressions
        • 4.2.11. Scalar Subqueries
        • 4.2.12. Array Constructors
        • 4.2.13. Row Constructors
        • 4.2.14. Expression Evaluation Rules
      • 4.3. Calling Functions
        • 4.3.1. Using Positional Notation
        • 4.3.2. Using Named Notation
        • 4.3.3. Using Mixed Notation
    • 5. Data Definition
      • 5.1. Table Basics
      • 5.2. Default Values
      • 5.3. Generated Columns
      • 5.4. Constraints
        • 5.4.1. Check Constraints
        • 5.4.2. Not-Null Constraints
        • 5.4.3. Unique Constraints
        • 5.4.4. Primary Keys
        • 5.4.5. Foreign Keys
        • 5.4.6. Exclusion Constraints
      • 5.5. System Columns
      • 5.6. Modifying Tables
        • 5.6.1. Adding a Column
        • 5.6.2. Removing a Column
        • 5.6.3. Adding a Constraint
        • 5.6.4. Removing a Constraint
        • 5.6.5. Changing a Column’s Default Value
        • 5.6.6. Changing a Column’s Data Type
        • 5.6.7. Renaming a Column
        • 5.6.8. Renaming a Table
      • 5.7. Privileges
      • 5.8. Row Security Policies
      • 5.9. Schemas
        • 5.9.1. Creating a Schema
        • 5.9.2. The Public Schema
        • 5.9.3. The Schema Search Path
        • 5.9.4. Schemas and Privileges
        • 5.9.5. The System Catalog Schema
        • 5.9.6. Usage Patterns
        • 5.9.7. Portability
      • 5.10. Inheritance
        • 5.10.1. Caveats
      • 5.11. Table Partitioning
        • 5.11.1. Overview
        • 5.11.2. Declarative Partitioning
        • 5.11.3. Partitioning Using Inheritance
        • 5.11.4. Partition Pruning
        • 5.11.5. Partitioning and Constraint Exclusion
        • 5.11.6. Best Practices for Declarative Partitioning
      • 5.12. Foreign Data
      • 5.13. Other Database Objects
      • 5.14. Dependency Tracking
    • 6. Data Manipulation
      • 6.1. Inserting Data
      • 6.2. Updating Data
      • 6.3. Deleting Data
      • 6.4. Returning Data from Modified Rows
    • 7. Queries
      • 7.1. Overview
      • 7.2. Table Expressions
        • 7.2.1. The FROM Clause
        • 7.2.2. The WHERE Clause
        • 7.2.3. The GROUP BY and HAVING Clauses
        • 7.2.4. GROUPING SETS, CUBE, and ROLLUP
        • 7.2.5. Window Function Processing
      • 7.3. Select Lists
        • 7.3.1. Select-List Items
        • 7.3.2. Column Labels
        • 7.3.3. DISTINCT
      • 7.4. Combining Queries (UNION, INTERSECT, EXCEPT)
      • 7.5. Sorting Rows (ORDER BY)
      • 7.6. LIMIT and OFFSET
      • 7.7. VALUES Lists
      • 7.8. WITH Queries (Common Table Expressions)
        • 7.8.1. SELECT in WITH
        • 7.8.2. Recursive Queries
        • 7.8.3. Common Table Expression Materialization
        • 7.8.4. Data-Modifying Statements in WITH
    • 8. Data Types
      • 8.1. Numeric Types
        • 8.1.1. Integer Types
        • 8.1.2. Arbitrary Precision Numbers
        • 8.1.3. Floating-Point Types
        • 8.1.4. Serial Types
      • 8.2. Monetary Types
      • 8.3. Character Types
      • 8.4. Binary Data Types
        • 8.4.1. bytea Hex Format
        • 8.4.2. bytea Escape Format
      • 8.5. Date/Time Types
        • 8.5.1. Date/Time Input
        • 8.5.2. Date/Time Output
        • 8.5.3. Time Zones
        • 8.5.4. Interval Input
        • 8.5.5. Interval Output
      • 8.6. Boolean Type
      • 8.7. Enumerated Types
        • 8.7.1. Declaration of Enumerated Types
        • 8.7.2. Ordering
        • 8.7.3. Type Safety
        • 8.7.4. Implementation Details
      • 8.8. Geometric Types
        • 8.8.1. Points
        • 8.8.2. Lines
        • 8.8.3. Line Segments
        • 8.8.4. Boxes
        • 8.8.5. Paths
        • 8.8.6. Polygons
        • 8.8.7. Circles
      • 8.9. Network Address Types
        • 8.9.1. inet
        • 8.9.2. cidr
        • 8.9.3. inet vs. cidr
        • 8.9.4. macaddr
        • 8.9.5. macaddr8
      • 8.10. Bit String Types
      • 8.11. Text Search Types
        • 8.11.1. tsvector
        • 8.11.2. tsquery
      • 8.12. UUID Type
      • 8.13. XML Type
        • 8.13.1. Creating XML Values
        • 8.13.2. Encoding Handling
        • 8.13.3. Accessing XML Values
      • 8.14. JSON Types
        • 8.14.1. JSON Input and Output Syntax
        • 8.14.2. Designing JSON Documents
        • 8.14.3. jsonb Containment and Existence
        • 8.14.4. jsonb Indexing
        • 8.14.5. jsonb Subscripting
        • 8.14.6. Transforms
        • 8.14.7. jsonpath Type
      • 8.15. Arrays
        • 8.15.1. Declaration of Array Types
        • 8.15.2. Array Value Input
        • 8.15.3. Accessing Arrays
        • 8.15.4. Modifying Arrays
        • 8.15.5. Searching in Arrays
        • 8.15.6. Array Input and Output Syntax
      • 8.16. Composite Types
        • 8.16.1. Declaration of Composite Types
        • 8.16.2. Constructing Composite Values
        • 8.16.3. Accessing Composite Types
        • 8.16.4. Modifying Composite Types
        • 8.16.5. Using Composite Types in Queries
        • 8.16.6. Composite Type Input and Output Syntax
      • 8.17. Range Types
        • 8.17.1. Built-in Range and Multirange Types
        • 8.17.2. Examples
        • 8.17.3. Inclusive and Exclusive Bounds
        • 8.17.4. Infinite (Unbounded) Ranges
        • 8.17.5. Range Input/Output
        • 8.17.6. Constructing Ranges and Multiranges
        • 8.17.7. Discrete Range Types
        • 8.17.8. Defining New Range Types
        • 8.17.9. Indexing
        • 8.17.10. Constraints on Ranges
      • 8.18. Domain Types
      • 8.19. Object Identifier Types
      • 8.20. pg_lsn Type
      • 8.21. Pseudo-Types
    • 9. Functions and Operators
      • 9.1. Logical Operators
      • 9.2. Comparison Functions and Operators
      • 9.3. Mathematical Functions and Operators
      • 9.4. String Functions and Operators
        • 9.4.1. format
      • 9.5. Binary String Functions and Operators
      • 9.6. Bit String Functions and Operators
      • 9.7. Pattern Matching
        • 9.7.1. LIKE
        • 9.7.2. SIMILAR TO Regular Expressions
        • 9.7.3. POSIX Regular Expressions
      • 9.8. Data Type Formatting Functions
      • 9.9. Date/Time Functions and Operators
        • 9.9.1. EXTRACT, date_part
        • 9.9.2. date_trunc
        • 9.9.3. date_bin
        • 9.9.4. AT TIME ZONE
        • 9.9.5. Current Date/Time
        • 9.9.6. Delaying Execution
      • 9.10. Enum Support Functions
      • 9.11. Geometric Functions and Operators
      • 9.12. Network Address Functions and Operators
      • 9.13. Text Search Functions and Operators
      • 9.14. UUID Functions
      • 9.15. XML Functions
        • 9.15.1. Producing XML Content
        • 9.15.2. XML Predicates
        • 9.15.3. Processing XML
        • 9.15.4. Mapping Tables to XML
      • 9.16. JSON Functions and Operators
        • 9.16.1. Processing and Creating JSON Data
        • 9.16.2. The SQL/JSON Path Language
      • 9.17. Sequence Manipulation Functions
      • 9.18. Conditional Expressions
        • 9.18.1. CASE
        • 9.18.2. COALESCE
        • 9.18.3. NULLIF
        • 9.18.4. GREATEST and LEAST
      • 9.19. Array Functions and Operators
      • 9.20. Range/Multirange Functions and Operators
      • 9.21. Aggregate Functions
      • 9.22. Window Functions
      • 9.23. Subquery Expressions
        • 9.23.1. EXISTS
        • 9.23.2. IN
        • 9.23.3. NOT IN
        • 9.23.4. ANY/SOME
        • 9.23.5. ALL
        • 9.23.6. Single-Row Comparison
      • 9.24. Row and Array Comparisons
        • 9.24.1. IN
        • 9.24.2. NOT IN
        • 9.24.3. ANY/SOME (array)
        • 9.24.4. ALL (array)
        • 9.24.5. Row Constructor Comparison
        • 9.24.6. Composite Type Comparison
      • 9.25. Set Returning Functions
      • 9.26. System Information Functions and Operators
        • 9.26.1. Session Information Functions
        • 9.26.2. Access Privilege Inquiry Functions
        • 9.26.3. Schema Visibility Inquiry Functions
        • 9.26.4. System Catalog Information Functions
        • 9.26.5. Object Information and Addressing Functions
        • 9.26.6. Comment Information Functions
        • 9.26.7. Data Validity Checking Functions
        • 9.26.8. Transaction ID and Snapshot Information Functions
        • 9.26.9. Committed Transaction Information Functions
        • 9.26.10. Control Data Functions
      • 9.27. System Administration Functions
        • 9.27.1. Configuration Settings Functions
        • 9.27.2. Server Signaling Functions
        • 9.27.3. Backup Control Functions
        • 9.27.4. Recovery Control Functions
        • 9.27.5. Snapshot Synchronization Functions
        • 9.27.6. Replication Management Functions
        • 9.27.7. Database Object Management Functions
        • 9.27.8. Index Maintenance Functions
        • 9.27.9. Generic File Access Functions
        • 9.27.10. Advisory Lock Functions
      • 9.28. Trigger Functions
      • 9.29. Event Trigger Functions
        • 9.29.1. Capturing Changes at Command End
        • 9.29.2. Processing Objects Dropped by a DDL Command
        • 9.29.3. Handling a Table Rewrite Event
      • 9.30. Statistics Information Functions
        • 9.30.1. Inspecting MCV Lists
    • 10. Type Conversion
      • 10.1. Overview
      • 10.2. Operators
      • 10.3. Functions
      • 10.4. Value Storage
      • 10.5. UNION, CASE, and Related Constructs
      • 10.6. SELECT Output Columns
    • 11. Indexes
      • 11.1. Introduction
      • 11.2. Index Types
        • 11.2.1. B-Tree
        • 11.2.2. Hash
        • 11.2.3. GiST
        • 11.2.4. SP-GiST
        • 11.2.5. GIN
        • 11.2.6. BRIN
      • 11.3. Multicolumn Indexes
      • 11.4. Indexes and ORDER BY
      • 11.5. Combining Multiple Indexes
      • 11.6. Unique Indexes
      • 11.7. Indexes on Expressions
      • 11.8. Partial Indexes
      • 11.9. Index-Only Scans and Covering Indexes
      • 11.10. Operator Classes and Operator Families
      • 11.11. Indexes and Collations
      • 11.12. Examining Index Usage
    • 12. Full Text Search
      • 12.1. Introduction
        • 12.1.1. What Is a Document?
        • 12.1.2. Basic Text Matching
        • 12.1.3. Configurations
      • 12.2. Tables and Indexes
        • 12.2.1. Searching a Table
        • 12.2.2. Creating Indexes
      • 12.3. Controlling Text Search
        • 12.3.1. Parsing Documents
        • 12.3.2. Parsing Queries
        • 12.3.3. Ranking Search Results
        • 12.3.4. Highlighting Results
      • 12.4. Additional Features
        • 12.4.1. Manipulating Documents
        • 12.4.2. Manipulating Queries
        • 12.4.3. Triggers for Automatic Updates
        • 12.4.4. Gathering Document Statistics
      • 12.5. Parsers
      • 12.6. Dictionaries
        • 12.6.1. Stop Words
        • 12.6.2. Simple Dictionary
        • 12.6.3. Synonym Dictionary
        • 12.6.4. Thesaurus Dictionary
        • 12.6.5. Ispell Dictionary
        • 12.6.6. Snowball Dictionary
      • 12.7. Configuration Example
      • 12.8. Testing and Debugging Text Search
        • 12.8.1. Configuration Testing
        • 12.8.2. Parser Testing
        • 12.8.3. Dictionary Testing
      • 12.9. Preferred Index Types for Text Search
      • 12.10. psql Support
      • 12.11. Limitations
    • 13. Concurrency Control
      • 13.1. Introduction
      • 13.2. Transaction Isolation
        • 13.2.1. Read Committed Isolation Level
        • 13.2.2. Repeatable Read Isolation Level
        • 13.2.3. Serializable Isolation Level
      • 13.3. Explicit Locking
        • 13.3.1. Table-Level Locks
        • 13.3.2. Row-Level Locks
        • 13.3.3. Page-Level Locks
        • 13.3.4. Deadlocks
        • 13.3.5. Advisory Locks
      • 13.4. Data Consistency Checks at the Application Level
        • 13.4.1. Enforcing Consistency with Serializable Transactions
        • 13.4.2. Enforcing Consistency with Explicit Blocking Locks
      • 13.5. Serialization Failure Handling
      • 13.6. Caveats
      • 13.7. Locking and Indexes
    • 14. Performance Tips
      • 14.1. Using EXPLAIN
        • 14.1.1. EXPLAIN Basics
        • 14.1.2. EXPLAIN ANALYZE
        • 14.1.3. Caveats
      • 14.2. Statistics Used by the Planner
        • 14.2.1. Single-Column Statistics
        • 14.2.2. Extended Statistics
      • 14.3. Controlling the Planner with Explicit JOIN Clauses
      • 14.4. Populating a Database
        • 14.4.1. Disable Autocommit
        • 14.4.2. Use COPY
        • 14.4.3. Remove Indexes
        • 14.4.4. Remove Foreign Key Constraints
        • 14.4.5. Increase maintenance_work_mem
        • 14.4.6. Increase max_wal_size
        • 14.4.7. Disable WAL Archival and Streaming Replication
        • 14.4.8. Run ANALYZE Afterwards
        • 14.4.9. Some Notes about pg_dump
      • 14.5. Non-Durable Settings
    • 15. Parallel Query
      • 15.1. How Parallel Query Works
      • 15.2. When Can Parallel Query Be Used?
      • 15.3. Parallel Plans
        • 15.3.1. Parallel Scans
        • 15.3.2. Parallel Joins
        • 15.3.3. Parallel Aggregation
        • 15.3.4. Parallel Append
        • 15.3.5. Parallel Plan Tips
      • 15.4. Parallel Safety
        • 15.4.1. Parallel Labeling for Functions and Aggregates
    • III. Server Administration
      • 16. Installation from Binaries
      • 17. Installation from Source Code
        • 17.1. Requirements
        • 17.2. Getting the Source
        • 17.3. Building and Installation with Autoconf and Make
        • 17.4. Building and Installation with Meson
        • 17.5. Post-Installation Setup
        • 17.6. Supported Platforms
        • 17.7. Platform-Specific Notes
      • 18. Installation from Source Code on Windows
        • 18.1. Building with Visual C++ or the Microsoft Windows SDK
      • 19. Server Setup and Operation
        • 19.1. The PostgreSQL User Account
        • 19.2. Creating a Database Cluster
        • 19.3. Starting the Database Server
        • 19.4. Managing Kernel Resources
        • 19.5. Shutting Down the Server
        • 19.6. Upgrading a PostgreSQL Cluster
        • 19.7. Preventing Server Spoofing
        • 19.8. Encryption Options
        • 19.9. Secure TCP/IP Connections with SSL
        • 19.10. Secure TCP/IP Connections with GSSAPI Encryption
        • 19.11. Secure TCP/IP Connections with SSH Tunnels
        • 19.12. Registering Event Log on Windows
      • 20. Server Configuration
        • 20.1. Setting Parameters
        • 20.2. File Locations
        • 20.3. Connections and Authentication
        • 20.4. Resource Consumption
        • 20.5. Write Ahead Log
        • 20.6. Replication
        • 20.7. Query Planning
        • 20.8. Error Reporting and Logging
        • 20.9. Run-time Statistics
        • 20.10. Automatic Vacuuming
        • 20.11. Client Connection Defaults
        • 20.12. Lock Management
        • 20.13. Version and Platform Compatibility
        • 20.14. Error Handling
        • 20.15. Preset Options
        • 20.16. Customized Options
        • 20.17. Developer Options
        • 20.18. Short Options
      • 21. Client Authentication
        • 21.1. The pg_hba.conf File
        • 21.2. User Name Maps
        • 21.3. Authentication Methods
        • 21.4. Trust Authentication
        • 21.5. Password Authentication
        • 21.6. GSSAPI Authentication
        • 21.7. SSPI Authentication
        • 21.8. Ident Authentication
        • 21.9. Peer Authentication
        • 21.10. LDAP Authentication
        • 21.11. RADIUS Authentication
        • 21.12. Certificate Authentication
        • 21.13. PAM Authentication
        • 21.14. BSD Authentication
        • 21.15. Authentication Problems
      • 22. Database Roles
        • 22.1. Database Roles
        • 22.2. Role Attributes
        • 22.3. Role Membership
        • 22.4. Dropping Roles
        • 22.5. Predefined Roles
        • 22.6. Function Security
      • 23. Managing Databases
        • 23.1. Overview
        • 23.2. Creating a Database
        • 23.3. Template Databases
        • 23.4. Database Configuration
        • 23.5. Destroying a Database
        • 23.6. Tablespaces
      • 24. Localization
        • 24.1. Locale Support
        • 24.2. Collation Support
        • 24.3. Character Set Support
      • 25. Routine Database Maintenance Tasks
        • 25.1. Routine Vacuuming
        • 25.2. Routine Reindexing
        • 25.3. Log File Maintenance
      • 26. Backup and Restore
        • 26.1. SQL Dump
        • 26.2. File System Level Backup
        • 26.3. Continuous Archiving and Point-in-Time Recovery (PITR)
      • 27. High Availability, Load Balancing, and Replication
        • 27.1. Comparison of Different Solutions
        • 27.2. Log-Shipping Standby Servers
        • 27.3. Failover
        • 27.4. Hot Standby
      • 28. Monitoring Database Activity
        • 28.1. Standard Unix Tools
        • 28.2. The Cumulative Statistics System
        • 28.3. Viewing Locks
        • 28.4. Progress Reporting
        • 28.5. Dynamic Tracing
      • 29. Monitoring Disk Usage
        • 29.1. Determining Disk Usage
        • 29.2. Disk Full Failure
      • 30. Reliability and the Write-Ahead Log
        • 30.1. Reliability
        • 30.2. Data Checksums
        • 30.3. Write-Ahead Logging (WAL)
        • 30.4. Asynchronous Commit
        • 30.5. WAL Configuration
        • 30.6. WAL Internals
      • 31. Logical Replication
        • 31.1. Publication
        • 31.2. Subscription
        • 31.3. Row Filters
        • 31.4. Column Lists
        • 31.5. Conflicts
        • 31.6. Restrictions
        • 31.7. Architecture
        • 31.8. Monitoring
        • 31.9. Security
        • 31.10. Configuration Settings
        • 31.11. Quick Setup
      • 32. Just-in-Time Compilation (JIT)
        • 32.1. What Is JIT compilation?
        • 32.2. When to JIT?
        • 32.3. Configuration
        • 32.4. Extensibility
      • 33. Regression Tests
        • 33.1. Running the Tests
        • 33.2. Test Evaluation
        • 33.3. Variant Comparison Files
        • 33.4. TAP Tests
        • 33.5. Test Coverage Examination
    • 16. Installation from Binaries
    • 17. Installation from Source Code
      • 17.1. Requirements
      • 17.2. Getting the Source
      • 17.3. Building and Installation with Autoconf and Make
        • 17.3.1. Short Version
        • 17.3.2. Installation Procedure
        • 17.3.3. configure Options
        • 17.3.4. configure Environment Variables
      • 17.4. Building and Installation with Meson
        • 17.4.1. Short Version
        • 17.4.2. Installation Procedure
        • 17.4.3. meson setup Options
      • 17.5. Post-Installation Setup
        • 17.5.1. Shared Libraries
        • 17.5.2. Environment Variables
      • 17.6. Supported Platforms
      • 17.7. Platform-Specific Notes
        • 17.7.1. AIX
        • 17.7.2. Cygwin
        • 17.7.3. macOS
        • 17.7.4. MinGW/Native Windows
        • 17.7.5. Solaris
    • 18. Installation from Source Code on Windows
      • 18.1. Building with Visual C++ or the Microsoft Windows SDK
        • 18.1.1. Requirements
        • 18.1.2. Special Considerations for 64-Bit Windows
        • 18.1.3. Building
        • 18.1.4. Cleaning and Installing
        • 18.1.5. Running the Regression Tests
    • 19. Server Setup and Operation
      • 19.1. The PostgreSQL User Account
      • 19.2. Creating a Database Cluster
        • 19.2.1. Use of Secondary File Systems
        • 19.2.2. File Systems
      • 19.3. Starting the Database Server
        • 19.3.1. Server Start-up Failures
        • 19.3.2. Client Connection Problems
      • 19.4. Managing Kernel Resources
        • 19.4.1. Shared Memory and Semaphores
        • 19.4.2. systemd RemoveIPC
        • 19.4.3. Resource Limits
        • 19.4.4. Linux Memory Overcommit
        • 19.4.5. Linux Huge Pages
      • 19.5. Shutting Down the Server
      • 19.6. Upgrading a PostgreSQL Cluster
        • 19.6.1. Upgrading Data via pg_dumpall
        • 19.6.2. Upgrading Data via pg_upgrade
        • 19.6.3. Upgrading Data via Replication
      • 19.7. Preventing Server Spoofing
      • 19.8. Encryption Options
      • 19.9. Secure TCP/IP Connections with SSL
        • 19.9.1. Basic Setup
        • 19.9.2. OpenSSL Configuration
        • 19.9.3. Using Client Certificates
        • 19.9.4. SSL Server File Usage
        • 19.9.5. Creating Certificates
      • 19.10. Secure TCP/IP Connections with GSSAPI Encryption
        • 19.10.1. Basic Setup
      • 19.11. Secure TCP/IP Connections with SSH Tunnels
      • 19.12. Registering Event Log on Windows
    • 20. Server Configuration
      • 20.1. Setting Parameters
        • 20.1.1. Parameter Names and Values
        • 20.1.2. Parameter Interaction via the Configuration File
        • 20.1.3. Parameter Interaction via SQL
        • 20.1.4. Parameter Interaction via the Shell
        • 20.1.5. Managing Configuration File Contents
      • 20.2. File Locations
      • 20.3. Connections and Authentication
        • 20.3.1. Connection Settings
        • 20.3.2. TCP Settings
        • 20.3.3. Authentication
        • 20.3.4. SSL
      • 20.4. Resource Consumption
        • 20.4.1. Memory
        • 20.4.2. Disk
        • 20.4.3. Kernel Resource Usage
        • 20.4.4. Cost-based Vacuum Delay
        • 20.4.5. Background Writer
        • 20.4.6. Asynchronous Behavior
      • 20.5. Write Ahead Log
        • 20.5.1. Settings
        • 20.5.2. Checkpoints
        • 20.5.3. Archiving
        • 20.5.4. Recovery
        • 20.5.5. Archive Recovery
        • 20.5.6. Recovery Target
      • 20.6. Replication
        • 20.6.1. Sending Servers
        • 20.6.2. Primary Server
        • 20.6.3. Standby Servers
        • 20.6.4. Subscribers
      • 20.7. Query Planning
        • 20.7.1. Planner Method Configuration
        • 20.7.2. Planner Cost Constants
        • 20.7.3. Genetic Query Optimizer
        • 20.7.4. Other Planner Options
      • 20.8. Error Reporting and Logging
        • 20.8.1. Where to Log
        • 20.8.2. When to Log
        • 20.8.3. What to Log
        • 20.8.4. Using CSV-Format Log Output
        • 20.8.5. Using JSON-Format Log Output
        • 20.8.6. Process Title
      • 20.9. Run-time Statistics
        • 20.9.1. Cumulative Query and Index Statistics
        • 20.9.2. Statistics Monitoring
      • 20.10. Automatic Vacuuming
      • 20.11. Client Connection Defaults
        • 20.11.1. Statement Behavior
        • 20.11.2. Locale and Formatting
        • 20.11.3. Shared Library Preloading
        • 20.11.4. Other Defaults
      • 20.12. Lock Management
      • 20.13. Version and Platform Compatibility
        • 20.13.1. Previous PostgreSQL Versions
        • 20.13.2. Platform and Client Compatibility
      • 20.14. Error Handling
      • 20.15. Preset Options
      • 20.16. Customized Options
      • 20.17. Developer Options
      • 20.18. Short Options
    • 21. Client Authentication
      • 21.1. The pg_hba.conf File
      • 21.2. User Name Maps
      • 21.3. Authentication Methods
      • 21.4. Trust Authentication
      • 21.5. Password Authentication
      • 21.6. GSSAPI Authentication
      • 21.7. SSPI Authentication
      • 21.8. Ident Authentication
      • 21.9. Peer Authentication
      • 21.10. LDAP Authentication
      • 21.11. RADIUS Authentication
      • 21.12. Certificate Authentication
      • 21.13. PAM Authentication
      • 21.14. BSD Authentication
      • 21.15. Authentication Problems
    • 22. Database Roles
      • 22.1. Database Roles
      • 22.2. Role Attributes
      • 22.3. Role Membership
      • 22.4. Dropping Roles
      • 22.5. Predefined Roles
      • 22.6. Function Security
    • 23. Managing Databases
      • 23.1. Overview
      • 23.2. Creating a Database
      • 23.3. Template Databases
      • 23.4. Database Configuration
      • 23.5. Destroying a Database
      • 23.6. Tablespaces
    • 24. Localization
      • 24.1. Locale Support
        • 24.1.1. Overview
        • 24.1.2. Behavior
        • 24.1.3. Selecting Locales
        • 24.1.4. Locale Providers
        • 24.1.5. ICU Locales
        • 24.1.6. Problems
      • 24.2. Collation Support
        • 24.2.1. Concepts
        • 24.2.2. Managing Collations
        • 24.2.3. ICU Custom Collations
      • 24.3. Character Set Support
        • 24.3.1. Supported Character Sets
        • 24.3.2. Setting the Character Set
        • 24.3.3. Automatic Character Set Conversion Between Server and Client
        • 24.3.4. Available Character Set Conversions
        • 24.3.5. Further Reading
    • 25. Routine Database Maintenance Tasks
      • 25.1. Routine Vacuuming
        • 25.1.1. Vacuuming Basics
        • 25.1.2. Recovering Disk Space
        • 25.1.3. Updating Planner Statistics
        • 25.1.4. Updating the Visibility Map
        • 25.1.5. Preventing Transaction ID Wraparound Failures
        • 25.1.6. The Autovacuum Daemon
      • 25.2. Routine Reindexing
      • 25.3. Log File Maintenance
    • 26. Backup and Restore
      • 26.1. SQL Dump
        • 26.1.1. Restoring the Dump
        • 26.1.2. Using pg_dumpall
        • 26.1.3. Handling Large Databases
      • 26.2. File System Level Backup
      • 26.3. Continuous Archiving and Point-in-Time Recovery (PITR)
        • 26.3.1. Setting Up WAL Archiving
        • 26.3.2. Making a Base Backup
        • 26.3.3. Making a Base Backup Using the Low Level API
        • 26.3.4. Recovering Using a Continuous Archive Backup
        • 26.3.5. Timelines
        • 26.3.6. Tips and Examples
        • 26.3.7. Caveats
    • 27. High Availability, Load Balancing, and Replication
      • 27.1. Comparison of Different Solutions
      • 27.2. Log-Shipping Standby Servers
        • 27.2.1. Planning
        • 27.2.2. Standby Server Operation
        • 27.2.3. Preparing the Primary for Standby Servers
        • 27.2.4. Setting Up a Standby Server
        • 27.2.5. Streaming Replication
        • 27.2.6. Replication Slots
        • 27.2.7. Cascading Replication
        • 27.2.8. Synchronous Replication
        • 27.2.9. Continuous Archiving in Standby
      • 27.3. Failover
      • 27.4. Hot Standby
        • 27.4.1. User’s Overview
        • 27.4.2. Handling Query Conflicts
        • 27.4.3. Administrator’s Overview
        • 27.4.4. Hot Standby Parameter Reference
        • 27.4.5. Caveats
    • 28. Monitoring Database Activity
      • 28.1. Standard Unix Tools
      • 28.2. The Cumulative Statistics System
        • 28.2.1. Statistics Collection Configuration
        • 28.2.2. Viewing Statistics
        • 28.2.3. pg_stat_activity
        • 28.2.4. pg_stat_replication
        • 28.2.5. pg_stat_replication_slots
        • 28.2.6. pg_stat_wal_receiver
        • 28.2.7. pg_stat_recovery_prefetch
        • 28.2.8. pg_stat_subscription
        • 28.2.9. pg_stat_subscription_stats
        • 28.2.10. pg_stat_ssl
        • 28.2.11. pg_stat_gssapi
        • 28.2.12. pg_stat_archiver
        • 28.2.13. pg_stat_io
        • 28.2.14. pg_stat_bgwriter
        • 28.2.15. pg_stat_wal
        • 28.2.16. pg_stat_database
        • 28.2.17. pg_stat_database_conflicts
        • 28.2.18. pg_stat_all_tables
        • 28.2.19. pg_stat_all_indexes
        • 28.2.20. pg_statio_all_tables
        • 28.2.21. pg_statio_all_indexes
        • 28.2.22. pg_statio_all_sequences
        • 28.2.23. pg_stat_user_functions
        • 28.2.24. pg_stat_slru
        • 28.2.25. Statistics Functions
      • 28.3. Viewing Locks
      • 28.4. Progress Reporting
        • 28.4.1. ANALYZE Progress Reporting
        • 28.4.2. CLUSTER Progress Reporting
        • 28.4.3. COPY Progress Reporting
        • 28.4.4. CREATE INDEX Progress Reporting
        • 28.4.5. VACUUM Progress Reporting
        • 28.4.6. Base Backup Progress Reporting
      • 28.5. Dynamic Tracing
        • 28.5.1. Compiling for Dynamic Tracing
        • 28.5.2. Built-in Probes
        • 28.5.3. Using Probes
        • 28.5.4. Defining New Probes
    • 29. Monitoring Disk Usage
      • 29.1. Determining Disk Usage
      • 29.2. Disk Full Failure
    • 30. Reliability and the Write-Ahead Log
      • 30.1. Reliability
      • 30.2. Data Checksums
        • 30.2.1. Off-line Enabling of Checksums
      • 30.3. Write-Ahead Logging (WAL)
      • 30.4. Asynchronous Commit
      • 30.5. WAL Configuration
      • 30.6. WAL Internals
    • 31. Logical Replication
      • 31.1. Publication
      • 31.2. Subscription
        • 31.2.1. Replication Slot Management
        • 31.2.2. Examples: Set Up Logical Replication
        • 31.2.3. Examples: Deferred Replication Slot Creation
      • 31.3. Row Filters
        • 31.3.1. Row Filter Rules
        • 31.3.2. Expression Restrictions
        • 31.3.3. UPDATE Transformations
        • 31.3.4. Partitioned Tables
        • 31.3.5. Initial Data Synchronization
        • 31.3.6. Combining Multiple Row Filters
        • 31.3.7. Examples
      • 31.4. Column Lists
        • 31.4.1. Examples
      • 31.5. Conflicts
      • 31.6. Restrictions
      • 31.7. Architecture
        • 31.7.1. Initial Snapshot
      • 31.8. Monitoring
      • 31.9. Security
      • 31.10. Configuration Settings
        • 31.10.1. Publishers
        • 31.10.2. Subscribers
      • 31.11. Quick Setup
    • 32. Just-in-Time Compilation (JIT)
      • 32.1. What Is JIT compilation?
        • 32.1.1. JIT Accelerated Operations
        • 32.1.2. Inlining
        • 32.1.3. Optimization
      • 32.2. When to JIT?
      • 32.3. Configuration
      • 32.4. Extensibility
        • 32.4.1. Inlining Support for Extensions
        • 32.4.2. Pluggable JIT Providers
    • 33. Regression Tests
      • 33.1. Running the Tests
        • 33.1.1. Running the Tests Against a Temporary Installation
        • 33.1.2. Running the Tests Against an Existing Installation
        • 33.1.3. Additional Test Suites
        • 33.1.4. Locale and Encoding
        • 33.1.5. Custom Server Settings
        • 33.1.6. Extra Tests
      • 33.2. Test Evaluation
        • 33.2.1. Error Message Differences
        • 33.2.2. Locale Differences
        • 33.2.3. Date and Time Differences
        • 33.2.4. Floating-Point Differences
        • 33.2.5. Row Ordering Differences
        • 33.2.6. Insufficient Stack Depth
        • 33.2.7. The “random” Test
        • 33.2.8. Configuration Parameters
      • 33.3. Variant Comparison Files
      • 33.4. TAP Tests
        • 33.4.1. Environment Variables
      • 33.5. Test Coverage Examination
        • 33.5.1. Coverage with Autoconf and Make
        • 33.5.2. Coverage with Meson
    • IV. Client Interfaces
      • 34. libpq — C Library
        • 34.1. Database Connection Control Functions
        • 34.2. Connection Status Functions
        • 34.3. Command Execution Functions
        • 34.4. Asynchronous Command Processing
        • 34.5. Pipeline Mode
        • 34.6. Retrieving Query Results Row-by-Row
        • 34.7. Canceling Queries in Progress
        • 34.8. The Fast-Path Interface
        • 34.9. Asynchronous Notification
        • 34.10. Functions Associated with the COPY Command
        • 34.11. Control Functions
        • 34.12. Miscellaneous Functions
        • 34.13. Notice Processing
        • 34.14. Event System
        • 34.15. Environment Variables
        • 34.16. The Password File
        • 34.17. The Connection Service File
        • 34.18. LDAP Lookup of Connection Parameters
        • 34.19. SSL Support
        • 34.20. Behavior in Threaded Programs
        • 34.21. Building libpq Programs
        • 34.22. Example Programs
      • 35. Large Objects
        • 35.1. Introduction
        • 35.2. Implementation Features
        • 35.3. Client Interfaces
        • 35.4. Server-Side Functions
        • 35.5. Example Program
      • 36. ECPG — Embedded SQL in C
        • 36.1. The Concept
        • 36.2. Managing Database Connections
        • 36.3. Running SQL Commands
        • 36.4. Using Host Variables
        • 36.5. Dynamic SQL
        • 36.6. pgtypes Library
        • 36.7. Using Descriptor Areas
        • 36.8. Error Handling
        • 36.9. Preprocessor Directives
        • 36.10. Processing Embedded SQL Programs
        • 36.11. Library Functions
        • 36.12. Large Objects
        • 36.13. C++ Applications
        • 36.14. Embedded SQL Commands
        • 36.15. Informix Compatibility Mode
        • 36.16. Oracle Compatibility Mode
        • 36.17. Internals
      • 37. The Information Schema
        • 37.1. The Schema
        • 37.2. Data Types
        • 37.3. information_schema_catalog_name
        • 37.4. administrable_role_authorizations
        • 37.5. applicable_roles
        • 37.6. attributes
        • 37.7. character_sets
        • 37.8. check_constraint_routine_usage
        • 37.9. check_constraints
        • 37.10. collations
        • 37.11. collation_character_set_applicability
        • 37.12. column_column_usage
        • 37.13. column_domain_usage
        • 37.14. column_options
        • 37.15. column_privileges
        • 37.16. column_udt_usage
        • 37.17. columns
        • 37.18. constraint_column_usage
        • 37.19. constraint_table_usage
        • 37.20. data_type_privileges
        • 37.21. domain_constraints
        • 37.22. domain_udt_usage
        • 37.23. domains
        • 37.24. element_types
        • 37.25. enabled_roles
        • 37.26. foreign_data_wrapper_options
        • 37.27. foreign_data_wrappers
        • 37.28. foreign_server_options
        • 37.29. foreign_servers
        • 37.30. foreign_table_options
        • 37.31. foreign_tables
        • 37.32. key_column_usage
        • 37.33. parameters
        • 37.34. referential_constraints
        • 37.35. role_column_grants
        • 37.36. role_routine_grants
        • 37.37. role_table_grants
        • 37.38. role_udt_grants
        • 37.39. role_usage_grants
        • 37.40. routine_column_usage
        • 37.41. routine_privileges
        • 37.42. routine_routine_usage
        • 37.43. routine_sequence_usage
        • 37.44. routine_table_usage
        • 37.45. routines
        • 37.46. schemata
        • 37.47. sequences
        • 37.48. sql_features
        • 37.49. sql_implementation_info
        • 37.50. sql_parts
        • 37.51. sql_sizing
        • 37.52. table_constraints
        • 37.53. table_privileges
        • 37.54. tables
        • 37.55. transforms
        • 37.56. triggered_update_columns
        • 37.57. triggers
        • 37.58. udt_privileges
        • 37.59. usage_privileges
        • 37.60. user_defined_types
        • 37.61. user_mapping_options
        • 37.62. user_mappings
        • 37.63. view_column_usage
        • 37.64. view_routine_usage
        • 37.65. view_table_usage
        • 37.66. views
    • 34. libpq — C Library
      • 34.1. Database Connection Control Functions
        • 34.1.1. Connection Strings
        • 34.1.2. Parameter Key Words
      • 34.2. Connection Status Functions
      • 34.3. Command Execution Functions
        • 34.3.1. Main Functions
        • 34.3.2. Retrieving Query Result Information
        • 34.3.3. Retrieving Other Result Information
        • 34.3.4. Escaping Strings for Inclusion in SQL Commands
      • 34.4. Asynchronous Command Processing
      • 34.5. Pipeline Mode
        • 34.5.1. Using Pipeline Mode
        • 34.5.2. Functions Associated with Pipeline Mode
        • 34.5.3. When to Use Pipeline Mode
      • 34.6. Retrieving Query Results Row-by-Row
      • 34.7. Canceling Queries in Progress
      • 34.8. The Fast-Path Interface
      • 34.9. Asynchronous Notification
      • 34.10. Functions Associated with the COPY Command
        • 34.10.1. Functions for Sending COPY Data
        • 34.10.2. Functions for Receiving COPY Data
        • 34.10.3. Obsolete Functions for COPY
      • 34.11. Control Functions
      • 34.12. Miscellaneous Functions
      • 34.13. Notice Processing
      • 34.14. Event System
        • 34.14.1. Event Types
        • 34.14.2. Event Callback Procedure
        • 34.14.3. Event Support Functions
        • 34.14.4. Event Example
      • 34.15. Environment Variables
      • 34.16. The Password File
      • 34.17. The Connection Service File
      • 34.18. LDAP Lookup of Connection Parameters
      • 34.19. SSL Support
        • 34.19.1. Client Verification of Server Certificates
        • 34.19.2. Client Certificates
        • 34.19.3. Protection Provided in Different Modes
        • 34.19.4. SSL Client File Usage
        • 34.19.5. SSL Library Initialization
      • 34.20. Behavior in Threaded Programs
      • 34.21. Building libpq Programs
      • 34.22. Example Programs
    • 35. Large Objects
      • 35.1. Introduction
      • 35.2. Implementation Features
      • 35.3. Client Interfaces
        • 35.3.1. Creating a Large Object
        • 35.3.2. Importing a Large Object
        • 35.3.3. Exporting a Large Object
        • 35.3.4. Opening an Existing Large Object
        • 35.3.5. Writing Data to a Large Object
        • 35.3.6. Reading Data from a Large Object
        • 35.3.7. Seeking in a Large Object
        • 35.3.8. Obtaining the Seek Position of a Large Object
        • 35.3.9. Truncating a Large Object
        • 35.3.10. Closing a Large Object Descriptor
        • 35.3.11. Removing a Large Object
      • 35.4. Server-Side Functions
      • 35.5. Example Program
    • 36. ECPG — Embedded SQL in C
      • 36.1. The Concept
      • 36.2. Managing Database Connections
        • 36.2.1. Connecting to the Database Server
        • 36.2.2. Choosing a Connection
        • 36.2.3. Closing a Connection
      • 36.3. Running SQL Commands
        • 36.3.1. Executing SQL Statements
        • 36.3.2. Using Cursors
        • 36.3.3. Managing Transactions
        • 36.3.4. Prepared Statements
      • 36.4. Using Host Variables
        • 36.4.1. Overview
        • 36.4.2. Declare Sections
        • 36.4.3. Retrieving Query Results
        • 36.4.4. Type Mapping
        • 36.4.5. Handling Nonprimitive SQL Data Types
        • 36.4.6. Indicators
      • 36.5. Dynamic SQL
        • 36.5.1. Executing Statements without a Result Set
        • 36.5.2. Executing a Statement with Input Parameters
        • 36.5.3. Executing a Statement with a Result Set
      • 36.6. pgtypes Library
        • 36.6.1. Character Strings
        • 36.6.2. The numeric Type
        • 36.6.3. The date Type
        • 36.6.4. The timestamp Type
        • 36.6.5. The interval Type
        • 36.6.6. The decimal Type
        • 36.6.7. errno Values of pgtypeslib
        • 36.6.8. Special Constants of pgtypeslib
      • 36.7. Using Descriptor Areas
        • 36.7.1. Named SQL Descriptor Areas
        • 36.7.2. SQLDA Descriptor Areas
      • 36.8. Error Handling
        • 36.8.1. Setting Callbacks
        • 36.8.2. sqlca
        • 36.8.3. SQLSTATE vs. SQLCODE
      • 36.9. Preprocessor Directives
        • 36.9.1. Including Files
        • 36.9.2. The define and undef Directives
        • 36.9.3. ifdef, ifndef, elif, else, and endif Directives
      • 36.10. Processing Embedded SQL Programs
      • 36.11. Library Functions
      • 36.12. Large Objects
      • 36.13. C++ Applications
        • 36.13.1. Scope for Host Variables
        • 36.13.2. C++ Application Development with External C Module
      • 36.14. Embedded SQL Commands
        • ALLOCATE DESCRIPTOR
        • CONNECT
        • DEALLOCATE DESCRIPTOR
        • DECLARE
        • DECLARE STATEMENT
        • DESCRIBE
        • DISCONNECT
        • EXECUTE IMMEDIATE
        • GET DESCRIPTOR
        • OPEN
        • PREPARE
        • SET AUTOCOMMIT
        • SET CONNECTION
        • SET DESCRIPTOR
        • TYPE
        • VAR
        • WHENEVER
      • 36.15. Informix Compatibility Mode
        • 36.15.1. Additional Types
        • 36.15.2. Additional/Missing Embedded SQL Statements
        • 36.15.3. Informix-compatible SQLDA Descriptor Areas
        • 36.15.4. Additional Functions
        • 36.15.5. Additional Constants
      • 36.16. Oracle Compatibility Mode
      • 36.17. Internals
    • 37. The Information Schema
      • 37.1. The Schema
      • 37.2. Data Types
      • 37.3. information_schema_catalog_name
      • 37.4. administrable_role_authorizations
      • 37.5. applicable_roles
      • 37.6. attributes
      • 37.7. character_sets
      • 37.8. check_constraint_routine_usage
      • 37.9. check_constraints
      • 37.10. collations
      • 37.11. collation_character_set_applicability
      • 37.12. column_column_usage
      • 37.13. column_domain_usage
      • 37.14. column_options
      • 37.15. column_privileges
      • 37.16. column_udt_usage
      • 37.17. columns
      • 37.18. constraint_column_usage
      • 37.19. constraint_table_usage
      • 37.20. data_type_privileges
      • 37.21. domain_constraints
      • 37.22. domain_udt_usage
      • 37.23. domains
      • 37.24. element_types
      • 37.25. enabled_roles
      • 37.26. foreign_data_wrapper_options
      • 37.27. foreign_data_wrappers
      • 37.28. foreign_server_options
      • 37.29. foreign_servers
      • 37.30. foreign_table_options
      • 37.31. foreign_tables
      • 37.32. key_column_usage
      • 37.33. parameters
      • 37.34. referential_constraints
      • 37.35. role_column_grants
      • 37.36. role_routine_grants
      • 37.37. role_table_grants
      • 37.38. role_udt_grants
      • 37.39. role_usage_grants
      • 37.40. routine_column_usage
      • 37.41. routine_privileges
      • 37.42. routine_routine_usage
      • 37.43. routine_sequence_usage
      • 37.44. routine_table_usage
      • 37.45. routines
      • 37.46. schemata
      • 37.47. sequences
      • 37.48. sql_features
      • 37.49. sql_implementation_info
      • 37.50. sql_parts
      • 37.51. sql_sizing
      • 37.52. table_constraints
      • 37.53. table_privileges
      • 37.54. tables
      • 37.55. transforms
      • 37.56. triggered_update_columns
      • 37.57. triggers
      • 37.58. udt_privileges
      • 37.59. usage_privileges
      • 37.60. user_defined_types
      • 37.61. user_mapping_options
      • 37.62. user_mappings
      • 37.63. view_column_usage
      • 37.64. view_routine_usage
      • 37.65. view_table_usage
      • 37.66. views
    • V. Server Programming
      • 38. Extending SQL
        • 38.1. How Extensibility Works
        • 38.2. The PostgreSQL Type System
        • 38.3. User-Defined Functions
        • 38.4. User-Defined Procedures
        • 38.5. Query Language (SQL) Functions
        • 38.6. Function Overloading
        • 38.7. Function Volatility Categories
        • 38.8. Procedural Language Functions
        • 38.9. Internal Functions
        • 38.10. C-Language Functions
        • 38.11. Function Optimization Information
        • 38.12. User-Defined Aggregates
        • 38.13. User-Defined Types
        • 38.14. User-Defined Operators
        • 38.15. Operator Optimization Information
        • 38.16. Interfacing Extensions to Indexes
        • 38.17. Packaging Related Objects into an Extension
        • 38.18. Extension Building Infrastructure
      • 39. Triggers
        • 39.1. Overview of Trigger Behavior
        • 39.2. Visibility of Data Changes
        • 39.3. Writing Trigger Functions in C
        • 39.4. A Complete Trigger Example
      • 40. Event Triggers
        • 40.1. Overview of Event Trigger Behavior
        • 40.2. Event Trigger Firing Matrix
        • 40.3. Writing Event Trigger Functions in C
        • 40.4. A Complete Event Trigger Example
        • 40.5. A Table Rewrite Event Trigger Example
      • 41. The Rule System
        • 41.1. The Query Tree
        • 41.2. Views and the Rule System
        • 41.3. Materialized Views
        • 41.4. Rules on INSERT, UPDATE, and DELETE
        • 41.5. Rules and Privileges
        • 41.6. Rules and Command Status
        • 41.7. Rules Versus Triggers
      • 42. Procedural Languages
        • 42.1. Installing Procedural Languages
      • 43. PL/pgSQL — SQL Procedural Language
        • 43.1. Overview
        • 43.2. Structure of PL/pgSQL
        • 43.3. Declarations
        • 43.4. Expressions
        • 43.5. Basic Statements
        • 43.6. Control Structures
        • 43.7. Cursors
        • 43.8. Transaction Management
        • 43.9. Errors and Messages
        • 43.10. Trigger Functions
        • 43.11. PL/pgSQL under the Hood
        • 43.12. Tips for Developing in PL/pgSQL
        • 43.13. Porting from Oracle PL/SQL
      • 44. PL/Tcl — Tcl Procedural Language
        • 44.1. Overview
        • 44.2. PL/Tcl Functions and Arguments
        • 44.3. Data Values in PL/Tcl
        • 44.4. Global Data in PL/Tcl
        • 44.5. Database Access from PL/Tcl
        • 44.6. Trigger Functions in PL/Tcl
        • 44.7. Event Trigger Functions in PL/Tcl
        • 44.8. Error Handling in PL/Tcl
        • 44.9. Explicit Subtransactions in PL/Tcl
        • 44.10. Transaction Management
        • 44.11. PL/Tcl Configuration
        • 44.12. Tcl Procedure Names
      • 45. PL/Perl — Perl Procedural Language
        • 45.1. PL/Perl Functions and Arguments
        • 45.2. Data Values in PL/Perl
        • 45.3. Built-in Functions
        • 45.4. Global Values in PL/Perl
        • 45.5. Trusted and Untrusted PL/Perl
        • 45.6. PL/Perl Triggers
        • 45.7. PL/Perl Event Triggers
        • 45.8. PL/Perl Under the Hood
      • 46. PL/Python — Python Procedural Language
        • 46.1. PL/Python Functions
        • 46.2. Data Values
        • 46.3. Sharing Data
        • 46.4. Anonymous Code Blocks
        • 46.5. Trigger Functions
        • 46.6. Database Access
        • 46.7. Explicit Subtransactions
        • 46.8. Transaction Management
        • 46.9. Utility Functions
        • 46.10. Python 2 vs. Python 3
        • 46.11. Environment Variables
      • 47. Server Programming Interface
        • 47.1. Interface Functions
        • 47.2. Interface Support Functions
        • 47.3. Memory Management
        • 47.4. Transaction Management
        • 47.5. Visibility of Data Changes
        • 47.6. Examples
      • 48. Background Worker Processes
      • 49. Logical Decoding
        • 49.1. Logical Decoding Examples
        • 49.2. Logical Decoding Concepts
        • 49.3. Streaming Replication Protocol Interface
        • 49.4. Logical Decoding SQL Interface
        • 49.5. System Catalogs Related to Logical Decoding
        • 49.6. Logical Decoding Output Plugins
        • 49.7. Logical Decoding Output Writers
        • 49.8. Synchronous Replication Support for Logical Decoding
        • 49.9. Streaming of Large Transactions for Logical Decoding
        • 49.10. Two-phase Commit Support for Logical Decoding
      • 50. Replication Progress Tracking
      • 51. Archive Modules
        • 51.1. Initialization Functions
        • 51.2. Archive Module Callbacks
    • 38. Extending SQL
      • 38.1. How Extensibility Works
      • 38.2. The PostgreSQL Type System
        • 38.2.1. Base Types
        • 38.2.2. Container Types
        • 38.2.3. Domains
        • 38.2.4. Pseudo-Types
        • 38.2.5. Polymorphic Types
      • 38.3. User-Defined Functions
      • 38.4. User-Defined Procedures
      • 38.5. Query Language (SQL) Functions
        • 38.5.1. Arguments for SQL Functions
        • 38.5.2. SQL Functions on Base Types
        • 38.5.3. SQL Functions on Composite Types
        • 38.5.4. SQL Functions with Output Parameters
        • 38.5.5. SQL Procedures with Output Parameters
        • 38.5.6. SQL Functions with Variable Numbers of Arguments
        • 38.5.7. SQL Functions with Default Values for Arguments
        • 38.5.8. SQL Functions as Table Sources
        • 38.5.9. SQL Functions Returning Sets
        • 38.5.10. SQL Functions Returning TABLE
        • 38.5.11. Polymorphic SQL Functions
        • 38.5.12. SQL Functions with Collations
      • 38.6. Function Overloading
      • 38.7. Function Volatility Categories
      • 38.8. Procedural Language Functions
      • 38.9. Internal Functions
      • 38.10. C-Language Functions
        • 38.10.1. Dynamic Loading
        • 38.10.2. Base Types in C-Language Functions
        • 38.10.3. Version 1 Calling Conventions
        • 38.10.4. Writing Code
        • 38.10.5. Compiling and Linking Dynamically-Loaded Functions
        • 38.10.6. Composite-Type Arguments
        • 38.10.7. Returning Rows (Composite Types)
        • 38.10.8. Returning Sets
        • 38.10.9. Polymorphic Arguments and Return Types
        • 38.10.10. Shared Memory and LWLocks
        • 38.10.11. Using C++ for Extensibility
      • 38.11. Function Optimization Information
      • 38.12. User-Defined Aggregates
        • 38.12.1. Moving-Aggregate Mode
        • 38.12.2. Polymorphic and Variadic Aggregates
        • 38.12.3. Ordered-Set Aggregates
        • 38.12.4. Partial Aggregation
        • 38.12.5. Support Functions for Aggregates
      • 38.13. User-Defined Types
        • 38.13.1. TOAST Considerations
      • 38.14. User-Defined Operators
      • 38.15. Operator Optimization Information
        • 38.15.1. COMMUTATOR
        • 38.15.2. NEGATOR
        • 38.15.3. RESTRICT
        • 38.15.4. JOIN
        • 38.15.5. HASHES
        • 38.15.6. MERGES
      • 38.16. Interfacing Extensions to Indexes
        • 38.16.1. Index Methods and Operator Classes
        • 38.16.2. Index Method Strategies
        • 38.16.3. Index Method Support Routines
        • 38.16.4. An Example
        • 38.16.5. Operator Classes and Operator Families
        • 38.16.6. System Dependencies on Operator Classes
        • 38.16.7. Ordering Operators
        • 38.16.8. Special Features of Operator Classes
      • 38.17. Packaging Related Objects into an Extension
        • 38.17.1. Extension Files
        • 38.17.2. Extension Relocatability
        • 38.17.3. Extension Configuration Tables
        • 38.17.4. Extension Updates
        • 38.17.5. Installing Extensions Using Update Scripts
        • 38.17.6. Security Considerations for Extensions
        • 38.17.7. Extension Example
      • 38.18. Extension Building Infrastructure
    • 39. Triggers
      • 39.1. Overview of Trigger Behavior
      • 39.2. Visibility of Data Changes
      • 39.3. Writing Trigger Functions in C
      • 39.4. A Complete Trigger Example
    • 40. Event Triggers
      • 40.1. Overview of Event Trigger Behavior
      • 40.2. Event Trigger Firing Matrix
      • 40.3. Writing Event Trigger Functions in C
      • 40.4. A Complete Event Trigger Example
      • 40.5. A Table Rewrite Event Trigger Example
    • 41. The Rule System
      • 41.1. The Query Tree
      • 41.2. Views and the Rule System
        • 41.2.1. How SELECT Rules Work
        • 41.2.2. View Rules in Non-SELECT Statements
        • 41.2.3. The Power of Views in PostgreSQL
        • 41.2.4. Updating a View
      • 41.3. Materialized Views
      • 41.4. Rules on INSERT, UPDATE, and DELETE
        • 41.4.1. How Update Rules Work
        • 41.4.2. Cooperation with Views
      • 41.5. Rules and Privileges
      • 41.6. Rules and Command Status
      • 41.7. Rules Versus Triggers
    • 42. Procedural Languages
      • 42.1. Installing Procedural Languages
    • 43. PL/pgSQL — SQL Procedural Language
      • 43.1. Overview
        • 43.1.1. Advantages of Using PL/pgSQL
        • 43.1.2. Supported Argument and Result Data Types
      • 43.2. Structure of PL/pgSQL
      • 43.3. Declarations
        • 43.3.1. Declaring Function Parameters
        • 43.3.2. ALIAS
        • 43.3.3. Copying Types
        • 43.3.4. Row Types
        • 43.3.5. Record Types
        • 43.3.6. Collation of PL/pgSQL Variables
      • 43.4. Expressions
      • 43.5. Basic Statements
        • 43.5.1. Assignment
        • 43.5.2. Executing SQL Commands
        • 43.5.3. Executing a Command with a Single-Row Result
        • 43.5.4. Executing Dynamic Commands
        • 43.5.5. Obtaining the Result Status
        • 43.5.6. Doing Nothing At All
      • 43.6. Control Structures
        • 43.6.1. Returning from a Function
        • 43.6.2. Returning from a Procedure
        • 43.6.3. Calling a Procedure
        • 43.6.4. Conditionals
        • 43.6.5. Simple Loops
        • 43.6.6. Looping through Query Results
        • 43.6.7. Looping through Arrays
        • 43.6.8. Trapping Errors
        • 43.6.9. Obtaining Execution Location Information
      • 43.7. Cursors
        • 43.7.1. Declaring Cursor Variables
        • 43.7.2. Opening Cursors
        • 43.7.3. Using Cursors
        • 43.7.4. Looping through a Cursor’s Result
      • 43.8. Transaction Management
      • 43.9. Errors and Messages
        • 43.9.1. Reporting Errors and Messages
        • 43.9.2. Checking Assertions
      • 43.10. Trigger Functions
        • 43.10.1. Triggers on Data Changes
        • 43.10.2. Triggers on Events
      • 43.11. PL/pgSQL under the Hood
        • 43.11.1. Variable Substitution
        • 43.11.2. Plan Caching
      • 43.12. Tips for Developing in PL/pgSQL
        • 43.12.1. Handling of Quotation Marks
        • 43.12.2. Additional Compile-Time and Run-Time Checks
      • 43.13. Porting from Oracle PL/SQL
        • 43.13.1. Porting Examples
        • 43.13.2. Other Things to Watch For
        • 43.13.3. Appendix
    • 44. PL/Tcl — Tcl Procedural Language
      • 44.1. Overview
      • 44.2. PL/Tcl Functions and Arguments
      • 44.3. Data Values in PL/Tcl
      • 44.4. Global Data in PL/Tcl
      • 44.5. Database Access from PL/Tcl
      • 44.6. Trigger Functions in PL/Tcl
      • 44.7. Event Trigger Functions in PL/Tcl
      • 44.8. Error Handling in PL/Tcl
      • 44.9. Explicit Subtransactions in PL/Tcl
      • 44.10. Transaction Management
      • 44.11. PL/Tcl Configuration
      • 44.12. Tcl Procedure Names
    • 45. PL/Perl — Perl Procedural Language
      • 45.1. PL/Perl Functions and Arguments
      • 45.2. Data Values in PL/Perl
      • 45.3. Built-in Functions
        • 45.3.1. Database Access from PL/Perl
        • 45.3.2. Utility Functions in PL/Perl
      • 45.4. Global Values in PL/Perl
      • 45.5. Trusted and Untrusted PL/Perl
      • 45.6. PL/Perl Triggers
      • 45.7. PL/Perl Event Triggers
      • 45.8. PL/Perl Under the Hood
        • 45.8.1. Configuration
        • 45.8.2. Limitations and Missing Features
    • 46. PL/Python — Python Procedural Language
      • 46.1. PL/Python Functions
      • 46.2. Data Values
        • 46.2.1. Data Type Mapping
        • 46.2.2. Null, None
        • 46.2.3. Arrays, Lists
        • 46.2.4. Composite Types
        • 46.2.5. Set-Returning Functions
      • 46.3. Sharing Data
      • 46.4. Anonymous Code Blocks
      • 46.5. Trigger Functions
      • 46.6. Database Access
        • 46.6.1. Database Access Functions
        • 46.6.2. Trapping Errors
      • 46.7. Explicit Subtransactions
        • 46.7.1. Subtransaction Context Managers
      • 46.8. Transaction Management
      • 46.9. Utility Functions
      • 46.10. Python 2 vs. Python 3
      • 46.11. Environment Variables
    • 47. Server Programming Interface
      • 47.1. Interface Functions
        • SPI_connect
        • SPI_finish
        • SPI_execute
        • SPI_exec
        • SPI_execute_extended
        • SPI_execute_with_args
        • SPI_prepare
        • SPI_prepare_cursor
        • SPI_prepare_extended
        • SPI_prepare_params
        • SPI_getargcount
        • SPI_getargtypeid
        • SPI_is_cursor_plan
        • SPI_execute_plan
        • SPI_execute_plan_extended
        • SPI_execute_plan_with_paramlist
        • SPI_execp
        • SPI_cursor_open
        • SPI_cursor_open_with_args
        • SPI_cursor_open_with_paramlist
        • SPI_cursor_parse_open
        • SPI_cursor_find
        • SPI_cursor_fetch
        • SPI_cursor_move
        • SPI_scroll_cursor_fetch
        • SPI_scroll_cursor_move
        • SPI_cursor_close
        • SPI_keepplan
        • SPI_saveplan
        • SPI_register_relation
        • SPI_unregister_relation
        • SPI_register_trigger_data
      • 47.2. Interface Support Functions
        • SPI_fname
        • SPI_fnumber
        • SPI_getvalue
        • SPI_getbinval
        • SPI_gettype
        • SPI_gettypeid
        • SPI_getrelname
        • SPI_getnspname
        • SPI_result_code_string
      • 47.3. Memory Management
        • SPI_palloc
        • SPI_repalloc
        • SPI_pfree
        • SPI_copytuple
        • SPI_returntuple
        • SPI_modifytuple
        • SPI_freetuple
        • SPI_freetuptable
        • SPI_freeplan
      • 47.4. Transaction Management
        • SPI_commit
        • SPI_rollback
        • SPI_start_transaction
      • 47.5. Visibility of Data Changes
      • 47.6. Examples
    • 48. Background Worker Processes
    • 49. Logical Decoding
      • 49.1. Logical Decoding Examples
      • 49.2. Logical Decoding Concepts
        • 49.2.1. Logical Decoding
        • 49.2.2. Replication Slots
        • 49.2.3. Output Plugins
        • 49.2.4. Exported Snapshots
      • 49.3. Streaming Replication Protocol Interface
      • 49.4. Logical Decoding SQL Interface
      • 49.5. System Catalogs Related to Logical Decoding
      • 49.6. Logical Decoding Output Plugins
        • 49.6.1. Initialization Function
        • 49.6.2. Capabilities
        • 49.6.3. Output Modes
        • 49.6.4. Output Plugin Callbacks
        • 49.6.5. Functions for Producing Output
      • 49.7. Logical Decoding Output Writers
      • 49.8. Synchronous Replication Support for Logical Decoding
        • 49.8.1. Overview
        • 49.8.2. Caveats
      • 49.9. Streaming of Large Transactions for Logical Decoding
      • 49.10. Two-phase Commit Support for Logical Decoding
    • 50. Replication Progress Tracking
    • 51. Archive Modules
      • 51.1. Initialization Functions
      • 51.2. Archive Module Callbacks
        • 51.2.1. Startup Callback
        • 51.2.2. Check Callback
        • 51.2.3. Archive Callback
        • 51.2.4. Shutdown Callback
    • VI. Reference
      • I. SQL Commands
        • ABORT
        • ALTER AGGREGATE
        • ALTER COLLATION
        • ALTER CONVERSION
        • ALTER DATABASE
        • ALTER DEFAULT PRIVILEGES
        • ALTER DOMAIN
        • ALTER EVENT TRIGGER
        • ALTER EXTENSION
        • ALTER FOREIGN DATA WRAPPER
        • ALTER FOREIGN TABLE
        • ALTER FUNCTION
        • ALTER GROUP
        • ALTER INDEX
        • ALTER LANGUAGE
        • ALTER LARGE OBJECT
        • ALTER MATERIALIZED VIEW
        • ALTER OPERATOR
        • ALTER OPERATOR CLASS
        • ALTER OPERATOR FAMILY
        • ALTER POLICY
        • ALTER PROCEDURE
        • ALTER PUBLICATION
        • ALTER ROLE
        • ALTER ROUTINE
        • ALTER RULE
        • ALTER SCHEMA
        • ALTER SEQUENCE
        • ALTER SERVER
        • ALTER STATISTICS
        • ALTER SUBSCRIPTION
        • ALTER SYSTEM
        • ALTER TABLE
        • ALTER TABLESPACE
        • ALTER TEXT SEARCH CONFIGURATION
        • ALTER TEXT SEARCH DICTIONARY
        • ALTER TEXT SEARCH PARSER
        • ALTER TEXT SEARCH TEMPLATE
        • ALTER TRIGGER
        • ALTER TYPE
        • ALTER USER
        • ALTER USER MAPPING
        • ALTER VIEW
        • ANALYZE
        • BEGIN
        • CALL
        • CHECKPOINT
        • CLOSE
        • CLUSTER
        • COMMENT
        • COMMIT
        • COMMIT PREPARED
        • COPY
        • CREATE ACCESS METHOD
        • CREATE AGGREGATE
        • CREATE CAST
        • CREATE COLLATION
        • CREATE CONVERSION
        • CREATE DATABASE
        • CREATE DOMAIN
        • CREATE EVENT TRIGGER
        • CREATE EXTENSION
        • CREATE FOREIGN DATA WRAPPER
        • CREATE FOREIGN TABLE
        • CREATE FUNCTION
        • CREATE GROUP
        • CREATE INDEX
        • CREATE LANGUAGE
        • CREATE MATERIALIZED VIEW
        • CREATE OPERATOR
        • CREATE OPERATOR CLASS
        • CREATE OPERATOR FAMILY
        • CREATE POLICY
        • CREATE PROCEDURE
        • CREATE PUBLICATION
        • CREATE ROLE
        • CREATE RULE
        • CREATE SCHEMA
        • CREATE SEQUENCE
        • CREATE SERVER
        • CREATE STATISTICS
        • CREATE SUBSCRIPTION
        • CREATE TABLE
        • CREATE TABLE AS
        • CREATE TABLESPACE
        • CREATE TEXT SEARCH CONFIGURATION
        • CREATE TEXT SEARCH DICTIONARY
        • CREATE TEXT SEARCH PARSER
        • CREATE TEXT SEARCH TEMPLATE
        • CREATE TRANSFORM
        • CREATE TRIGGER
        • CREATE TYPE
        • CREATE USER
        • CREATE USER MAPPING
        • CREATE VIEW
        • DEALLOCATE
        • DECLARE
        • DELETE
        • DISCARD
        • DO
        • DROP ACCESS METHOD
        • DROP AGGREGATE
        • DROP CAST
        • DROP COLLATION
        • DROP CONVERSION
        • DROP DATABASE
        • DROP DOMAIN
        • DROP EVENT TRIGGER
        • DROP EXTENSION
        • DROP FOREIGN DATA WRAPPER
        • DROP FOREIGN TABLE
        • DROP FUNCTION
        • DROP GROUP
        • DROP INDEX
        • DROP LANGUAGE
        • DROP MATERIALIZED VIEW
        • DROP OPERATOR
        • DROP OPERATOR CLASS
        • DROP OPERATOR FAMILY
        • DROP OWNED
        • DROP POLICY
        • DROP PROCEDURE
        • DROP PUBLICATION
        • DROP ROLE
        • DROP ROUTINE
        • DROP RULE
        • DROP SCHEMA
        • DROP SEQUENCE
        • DROP SERVER
        • DROP STATISTICS
        • DROP SUBSCRIPTION
        • DROP TABLE
        • DROP TABLESPACE
        • DROP TEXT SEARCH CONFIGURATION
        • DROP TEXT SEARCH DICTIONARY
        • DROP TEXT SEARCH PARSER
        • DROP TEXT SEARCH TEMPLATE
        • DROP TRANSFORM
        • DROP TRIGGER
        • DROP TYPE
        • DROP USER
        • DROP USER MAPPING
        • DROP VIEW
        • END
        • EXECUTE
        • EXPLAIN
        • FETCH
        • GRANT
        • IMPORT FOREIGN SCHEMA
        • INSERT
        • LISTEN
        • LOAD
        • LOCK
        • MERGE
        • MOVE
        • NOTIFY
        • PREPARE
        • PREPARE TRANSACTION
        • REASSIGN OWNED
        • REFRESH MATERIALIZED VIEW
        • REINDEX
        • RELEASE SAVEPOINT
        • RESET
        • REVOKE
        • ROLLBACK
        • ROLLBACK PREPARED
        • ROLLBACK TO SAVEPOINT
        • SAVEPOINT
        • SECURITY LABEL
        • SELECT
        • SELECT INTO
        • SET
        • SET CONSTRAINTS
        • SET ROLE
        • SET SESSION AUTHORIZATION
        • SET TRANSACTION
        • SHOW
        • START TRANSACTION
        • TRUNCATE
        • UNLISTEN
        • UPDATE
        • VACUUM
        • VALUES
      • II. PostgreSQL Client Applications
        • clusterdb
        • createdb
        • createuser
        • dropdb
        • dropuser
        • ecpg
        • pg_amcheck
        • pg_basebackup
        • pgbench
        • pg_config
        • pg_dump
        • pg_dumpall
        • pg_isready
        • pg_receivewal
        • pg_recvlogical
        • pg_restore
        • pg_verifybackup
        • psql
        • reindexdb
        • vacuumdb
      • III. PostgreSQL Server Applications
        • initdb
        • pg_archivecleanup
        • pg_checksums
        • pg_controldata
        • pg_ctl
        • pg_resetwal
        • pg_rewind
        • pg_test_fsync
        • pg_test_timing
        • pg_upgrade
        • pg_waldump
        • postgres
    • I. SQL Commands
      • ABORT
      • ALTER AGGREGATE
      • ALTER COLLATION
      • ALTER CONVERSION
      • ALTER DATABASE
      • ALTER DEFAULT PRIVILEGES
      • ALTER DOMAIN
      • ALTER EVENT TRIGGER
      • ALTER EXTENSION
      • ALTER FOREIGN DATA WRAPPER
      • ALTER FOREIGN TABLE
      • ALTER FUNCTION
      • ALTER GROUP
      • ALTER INDEX
      • ALTER LANGUAGE
      • ALTER LARGE OBJECT
      • ALTER MATERIALIZED VIEW
      • ALTER OPERATOR
      • ALTER OPERATOR CLASS
      • ALTER OPERATOR FAMILY
      • ALTER POLICY
      • ALTER PROCEDURE
      • ALTER PUBLICATION
      • ALTER ROLE
      • ALTER ROUTINE
      • ALTER RULE
      • ALTER SCHEMA
      • ALTER SEQUENCE
      • ALTER SERVER
      • ALTER STATISTICS
      • ALTER SUBSCRIPTION
      • ALTER SYSTEM
      • ALTER TABLE
      • ALTER TABLESPACE
      • ALTER TEXT SEARCH CONFIGURATION
      • ALTER TEXT SEARCH DICTIONARY
      • ALTER TEXT SEARCH PARSER
      • ALTER TEXT SEARCH TEMPLATE
      • ALTER TRIGGER
      • ALTER TYPE
      • ALTER USER
      • ALTER USER MAPPING
      • ALTER VIEW
      • ANALYZE
      • BEGIN
      • CALL
      • CHECKPOINT
      • CLOSE
      • CLUSTER
      • COMMENT
      • COMMIT
      • COMMIT PREPARED
      • COPY
      • CREATE ACCESS METHOD
      • CREATE AGGREGATE
      • CREATE CAST
      • CREATE COLLATION
      • CREATE CONVERSION
      • CREATE DATABASE
      • CREATE DOMAIN
      • CREATE EVENT TRIGGER
      • CREATE EXTENSION
      • CREATE FOREIGN DATA WRAPPER
      • CREATE FOREIGN TABLE
      • CREATE FUNCTION
      • CREATE GROUP
      • CREATE INDEX
      • CREATE LANGUAGE
      • CREATE MATERIALIZED VIEW
      • CREATE OPERATOR
      • CREATE OPERATOR CLASS
      • CREATE OPERATOR FAMILY
      • CREATE POLICY
      • CREATE PROCEDURE
      • CREATE PUBLICATION
      • CREATE ROLE
      • CREATE RULE
      • CREATE SCHEMA
      • CREATE SEQUENCE
      • CREATE SERVER
      • CREATE STATISTICS
      • CREATE SUBSCRIPTION
      • CREATE TABLE
      • CREATE TABLE AS
      • CREATE TABLESPACE
      • CREATE TEXT SEARCH CONFIGURATION
      • CREATE TEXT SEARCH DICTIONARY
      • CREATE TEXT SEARCH PARSER
      • CREATE TEXT SEARCH TEMPLATE
      • CREATE TRANSFORM
      • CREATE TRIGGER
      • CREATE TYPE
      • CREATE USER
      • CREATE USER MAPPING
      • CREATE VIEW
      • DEALLOCATE
      • DECLARE
      • DELETE
      • DISCARD
      • DO
      • DROP ACCESS METHOD
      • DROP AGGREGATE
      • DROP CAST
      • DROP COLLATION
      • DROP CONVERSION
      • DROP DATABASE
      • DROP DOMAIN
      • DROP EVENT TRIGGER
      • DROP EXTENSION
      • DROP FOREIGN DATA WRAPPER
      • DROP FOREIGN TABLE
      • DROP FUNCTION
      • DROP GROUP
      • DROP INDEX
      • DROP LANGUAGE
      • DROP MATERIALIZED VIEW
      • DROP OPERATOR
      • DROP OPERATOR CLASS
      • DROP OPERATOR FAMILY
      • DROP OWNED
      • DROP POLICY
      • DROP PROCEDURE
      • DROP PUBLICATION
      • DROP ROLE
      • DROP ROUTINE
      • DROP RULE
      • DROP SCHEMA
      • DROP SEQUENCE
      • DROP SERVER
      • DROP STATISTICS
      • DROP SUBSCRIPTION
      • DROP TABLE
      • DROP TABLESPACE
      • DROP TEXT SEARCH CONFIGURATION
      • DROP TEXT SEARCH DICTIONARY
      • DROP TEXT SEARCH PARSER
      • DROP TEXT SEARCH TEMPLATE
      • DROP TRANSFORM
      • DROP TRIGGER
      • DROP TYPE
      • DROP USER
      • DROP USER MAPPING
      • DROP VIEW
      • END
      • EXECUTE
      • EXPLAIN
      • FETCH
      • GRANT
      • IMPORT FOREIGN SCHEMA
      • INSERT
      • LISTEN
      • LOAD
      • LOCK
      • MERGE
      • MOVE
      • NOTIFY
      • PREPARE
      • PREPARE TRANSACTION
      • REASSIGN OWNED
      • REFRESH MATERIALIZED VIEW
      • REINDEX
      • RELEASE SAVEPOINT
      • RESET
      • REVOKE
      • ROLLBACK
      • ROLLBACK PREPARED
      • ROLLBACK TO SAVEPOINT
      • SAVEPOINT
      • SECURITY LABEL
      • SELECT
      • SELECT INTO
      • SET
      • SET CONSTRAINTS
      • SET ROLE
      • SET SESSION AUTHORIZATION
      • SET TRANSACTION
      • SHOW
      • START TRANSACTION
      • TRUNCATE
      • UNLISTEN
      • UPDATE
      • VACUUM
      • VALUES
    • II. PostgreSQL Client Applications
      • clusterdb
      • createdb
      • createuser
      • dropdb
      • dropuser
      • ecpg
      • pg_amcheck
      • pg_basebackup
      • pgbench
      • pg_config
      • pg_dump
      • pg_dumpall
      • pg_isready
      • pg_receivewal
      • pg_recvlogical
      • pg_restore
      • pg_verifybackup
      • psql
      • reindexdb
      • vacuumdb
    • III. PostgreSQL Server Applications
      • initdb
      • pg_archivecleanup
      • pg_checksums
      • pg_controldata
      • pg_ctl
      • pg_resetwal
      • pg_rewind
      • pg_test_fsync
      • pg_test_timing
      • pg_upgrade
      • pg_waldump
      • postgres
    • VII. Internals
      • 52. Overview of PostgreSQL Internals
        • 52.1. The Path of a Query
        • 52.2. How Connections Are Established
        • 52.3. The Parser Stage
        • 52.4. The PostgreSQL Rule System
        • 52.5. Planner/Optimizer
        • 52.6. Executor
      • 53. System Catalogs
        • 53.1. Overview
        • 53.2. pg_aggregate
        • 53.3. pg_am
        • 53.4. pg_amop
        • 53.5. pg_amproc
        • 53.6. pg_attrdef
        • 53.7. pg_attribute
        • 53.8. pg_authid
        • 53.9. pg_auth_members
        • 53.10. pg_cast
        • 53.11. pg_class
        • 53.12. pg_collation
        • 53.13. pg_constraint
        • 53.14. pg_conversion
        • 53.15. pg_database
        • 53.16. pg_db_role_setting
        • 53.17. pg_default_acl
        • 53.18. pg_depend
        • 53.19. pg_description
        • 53.20. pg_enum
        • 53.21. pg_event_trigger
        • 53.22. pg_extension
        • 53.23. pg_foreign_data_wrapper
        • 53.24. pg_foreign_server
        • 53.25. pg_foreign_table
        • 53.26. pg_index
        • 53.27. pg_inherits
        • 53.28. pg_init_privs
        • 53.29. pg_language
        • 53.30. pg_largeobject
        • 53.31. pg_largeobject_metadata
        • 53.32. pg_namespace
        • 53.33. pg_opclass
        • 53.34. pg_operator
        • 53.35. pg_opfamily
        • 53.36. pg_parameter_acl
        • 53.37. pg_partitioned_table
        • 53.38. pg_policy
        • 53.39. pg_proc
        • 53.40. pg_publication
        • 53.41. pg_publication_namespace
        • 53.42. pg_publication_rel
        • 53.43. pg_range
        • 53.44. pg_replication_origin
        • 53.45. pg_rewrite
        • 53.46. pg_seclabel
        • 53.47. pg_sequence
        • 53.48. pg_shdepend
        • 53.49. pg_shdescription
        • 53.50. pg_shseclabel
        • 53.51. pg_statistic
        • 53.52. pg_statistic_ext
        • 53.53. pg_statistic_ext_data
        • 53.54. pg_subscription
        • 53.55. pg_subscription_rel
        • 53.56. pg_tablespace
        • 53.57. pg_transform
        • 53.58. pg_trigger
        • 53.59. pg_ts_config
        • 53.60. pg_ts_config_map
        • 53.61. pg_ts_dict
        • 53.62. pg_ts_parser
        • 53.63. pg_ts_template
        • 53.64. pg_type
        • 53.65. pg_user_mapping
      • 54. System Views
        • 54.1. Overview
        • 54.2. pg_available_extensions
        • 54.3. pg_available_extension_versions
        • 54.4. pg_backend_memory_contexts
        • 54.5. pg_config
        • 54.6. pg_cursors
        • 54.7. pg_file_settings
        • 54.8. pg_group
        • 54.9. pg_hba_file_rules
        • 54.10. pg_ident_file_mappings
        • 54.11. pg_indexes
        • 54.12. pg_locks
        • 54.13. pg_matviews
        • 54.14. pg_policies
        • 54.15. pg_prepared_statements
        • 54.16. pg_prepared_xacts
        • 54.17. pg_publication_tables
        • 54.18. pg_replication_origin_status
        • 54.19. pg_replication_slots
        • 54.20. pg_roles
        • 54.21. pg_rules
        • 54.22. pg_seclabels
        • 54.23. pg_sequences
        • 54.24. pg_settings
        • 54.25. pg_shadow
        • 54.26. pg_shmem_allocations
        • 54.27. pg_stats
        • 54.28. pg_stats_ext
        • 54.29. pg_stats_ext_exprs
        • 54.30. pg_tables
        • 54.31. pg_timezone_abbrevs
        • 54.32. pg_timezone_names
        • 54.33. pg_user
        • 54.34. pg_user_mappings
        • 54.35. pg_views
      • 55. Frontend/Backend Protocol
        • 55.1. Overview
        • 55.2. Message Flow
        • 55.3. SASL Authentication
        • 55.4. Streaming Replication Protocol
        • 55.5. Logical Streaming Replication Protocol
        • 55.6. Message Data Types
        • 55.7. Message Formats
        • 55.8. Error and Notice Message Fields
        • 55.9. Logical Replication Message Formats
        • 55.10. Summary of Changes since Protocol 2.0
      • 56. PostgreSQL Coding Conventions
        • 56.1. Formatting
        • 56.2. Reporting Errors Within the Server
        • 56.3. Error Message Style Guide
        • 56.4. Miscellaneous Coding Conventions
      • 57. Native Language Support
        • 57.1. For the Translator
        • 57.2. For the Programmer
      • 58. Writing a Procedural Language Handler
      • 59. Writing a Foreign Data Wrapper
        • 59.1. Foreign Data Wrapper Functions
        • 59.2. Foreign Data Wrapper Callback Routines
        • 59.3. Foreign Data Wrapper Helper Functions
        • 59.4. Foreign Data Wrapper Query Planning
        • 59.5. Row Locking in Foreign Data Wrappers
      • 60. Writing a Table Sampling Method
        • 60.1. Sampling Method Support Functions
      • 61. Writing a Custom Scan Provider
        • 61.1. Creating Custom Scan Paths
        • 61.2. Creating Custom Scan Plans
        • 61.3. Executing Custom Scans
      • 62. Genetic Query Optimizer
        • 62.1. Query Handling as a Complex Optimization Problem
        • 62.2. Genetic Algorithms
        • 62.3. Genetic Query Optimization (GEQO) in PostgreSQL
        • 62.4. Further Reading
      • 63. Table Access Method Interface Definition
      • 64. Index Access Method Interface Definition
        • 64.1. Basic API Structure for Indexes
        • 64.2. Index Access Method Functions
        • 64.3. Index Scanning
        • 64.4. Index Locking Considerations
        • 64.5. Index Uniqueness Checks
        • 64.6. Index Cost Estimation Functions
      • 65. Generic WAL Records
      • 66. Custom WAL Resource Managers
      • 67. B-Tree Indexes
        • 67.1. Introduction
        • 67.2. Behavior of B-Tree Operator Classes
        • 67.3. B-Tree Support Functions
        • 67.4. Implementation
      • 68. GiST Indexes
        • 68.1. Introduction
        • 68.2. Built-in Operator Classes
        • 68.3. Extensibility
        • 68.4. Implementation
        • 68.5. Examples
      • 69. SP-GiST Indexes
        • 69.1. Introduction
        • 69.2. Built-in Operator Classes
        • 69.3. Extensibility
        • 69.4. Implementation
        • 69.5. Examples
      • 70. GIN Indexes
        • 70.1. Introduction
        • 70.2. Built-in Operator Classes
        • 70.3. Extensibility
        • 70.4. Implementation
        • 70.5. GIN Tips and Tricks
        • 70.6. Limitations
        • 70.7. Examples
      • 71. BRIN Indexes
        • 71.1. Introduction
        • 71.2. Built-in Operator Classes
        • 71.3. Extensibility
      • 72. Hash Indexes
        • 72.1. Overview
        • 72.2. Implementation
      • 73. Database Physical Storage
        • 73.1. Database File Layout
        • 73.2. TOAST
        • 73.3. Free Space Map
        • 73.4. Visibility Map
        • 73.5. The Initialization Fork
        • 73.6. Database Page Layout
        • 73.7. Heap-Only Tuples (HOT)
      • 74. Transaction Processing
        • 74.1. Transactions and Identifiers
        • 74.2. Transactions and Locking
        • 74.3. Subtransactions
        • 74.4. Two-Phase Transactions
      • 75. System Catalog Declarations and Initial Contents
        • 75.1. System Catalog Declaration Rules
        • 75.2. System Catalog Initial Data
        • 75.3. BKI File Format
        • 75.4. BKI Commands
        • 75.5. Structure of the Bootstrap BKI File
        • 75.6. BKI Example
      • 76. How the Planner Uses Statistics
        • 76.1. Row Estimation Examples
        • 76.2. Multivariate Statistics Examples
        • 76.3. Planner Statistics and Security
      • 77. Backup Manifest Format
        • 77.1. Backup Manifest Top-level Object
        • 77.2. Backup Manifest File Object
        • 77.3. Backup Manifest WAL Range Object
    • 52. Overview of PostgreSQL Internals
      • 52.1. The Path of a Query
      • 52.2. How Connections Are Established
      • 52.3. The Parser Stage
        • 52.3.1. Parser
        • 52.3.2. Transformation Process
      • 52.4. The PostgreSQL Rule System
      • 52.5. Planner/Optimizer
        • 52.5.1. Generating Possible Plans
      • 52.6. Executor
    • 53. System Catalogs
      • 53.1. Overview
      • 53.2. pg_aggregate
      • 53.3. pg_am
      • 53.4. pg_amop
      • 53.5. pg_amproc
      • 53.6. pg_attrdef
      • 53.7. pg_attribute
      • 53.8. pg_authid
      • 53.9. pg_auth_members
      • 53.10. pg_cast
      • 53.11. pg_class
      • 53.12. pg_collation
      • 53.13. pg_constraint
      • 53.14. pg_conversion
      • 53.15. pg_database
      • 53.16. pg_db_role_setting
      • 53.17. pg_default_acl
      • 53.18. pg_depend
      • 53.19. pg_description
      • 53.20. pg_enum
      • 53.21. pg_event_trigger
      • 53.22. pg_extension
      • 53.23. pg_foreign_data_wrapper
      • 53.24. pg_foreign_server
      • 53.25. pg_foreign_table
      • 53.26. pg_index
      • 53.27. pg_inherits
      • 53.28. pg_init_privs
      • 53.29. pg_language
      • 53.30. pg_largeobject
      • 53.31. pg_largeobject_metadata
      • 53.32. pg_namespace
      • 53.33. pg_opclass
      • 53.34. pg_operator
      • 53.35. pg_opfamily
      • 53.36. pg_parameter_acl
      • 53.37. pg_partitioned_table
      • 53.38. pg_policy
      • 53.39. pg_proc
      • 53.40. pg_publication
      • 53.41. pg_publication_namespace
      • 53.42. pg_publication_rel
      • 53.43. pg_range
      • 53.44. pg_replication_origin
      • 53.45. pg_rewrite
      • 53.46. pg_seclabel
      • 53.47. pg_sequence
      • 53.48. pg_shdepend
      • 53.49. pg_shdescription
      • 53.50. pg_shseclabel
      • 53.51. pg_statistic
      • 53.52. pg_statistic_ext
      • 53.53. pg_statistic_ext_data
      • 53.54. pg_subscription
      • 53.55. pg_subscription_rel
      • 53.56. pg_tablespace
      • 53.57. pg_transform
      • 53.58. pg_trigger
      • 53.59. pg_ts_config
      • 53.60. pg_ts_config_map
      • 53.61. pg_ts_dict
      • 53.62. pg_ts_parser
      • 53.63. pg_ts_template
      • 53.64. pg_type
      • 53.65. pg_user_mapping
    • 54. System Views
      • 54.1. Overview
      • 54.2. pg_available_extensions
      • 54.3. pg_available_extension_versions
      • 54.4. pg_backend_memory_contexts
      • 54.5. pg_config
      • 54.6. pg_cursors
      • 54.7. pg_file_settings
      • 54.8. pg_group
      • 54.9. pg_hba_file_rules
      • 54.10. pg_ident_file_mappings
      • 54.11. pg_indexes
      • 54.12. pg_locks
      • 54.13. pg_matviews
      • 54.14. pg_policies
      • 54.15. pg_prepared_statements
      • 54.16. pg_prepared_xacts
      • 54.17. pg_publication_tables
      • 54.18. pg_replication_origin_status
      • 54.19. pg_replication_slots
      • 54.20. pg_roles
      • 54.21. pg_rules
      • 54.22. pg_seclabels
      • 54.23. pg_sequences
      • 54.24. pg_settings
      • 54.25. pg_shadow
      • 54.26. pg_shmem_allocations
      • 54.27. pg_stats
      • 54.28. pg_stats_ext
      • 54.29. pg_stats_ext_exprs
      • 54.30. pg_tables
      • 54.31. pg_timezone_abbrevs
      • 54.32. pg_timezone_names
      • 54.33. pg_user
      • 54.34. pg_user_mappings
      • 54.35. pg_views
    • 55. Frontend/Backend Protocol
      • 55.1. Overview
        • 55.1.1. Messaging Overview
        • 55.1.2. Extended Query Overview
        • 55.1.3. Formats and Format Codes
      • 55.2. Message Flow
        • 55.2.1. Start-up
        • 55.2.2. Simple Query
        • 55.2.3. Extended Query
        • 55.2.4. Pipelining
        • 55.2.5. Function Call
        • 55.2.6. COPY Operations
        • 55.2.7. Asynchronous Operations
        • 55.2.8. Canceling Requests in Progress
        • 55.2.9. Termination
        • 55.2.10. SSL Session Encryption
        • 55.2.11. GSSAPI Session Encryption
      • 55.3. SASL Authentication
        • 55.3.1. SCRAM-SHA-256 Authentication
      • 55.4. Streaming Replication Protocol
      • 55.5. Logical Streaming Replication Protocol
        • 55.5.1. Logical Streaming Replication Parameters
        • 55.5.2. Logical Replication Protocol Messages
        • 55.5.3. Logical Replication Protocol Message Flow
      • 55.6. Message Data Types
      • 55.7. Message Formats
      • 55.8. Error and Notice Message Fields
      • 55.9. Logical Replication Message Formats
      • 55.10. Summary of Changes since Protocol 2.0
    • 56. PostgreSQL Coding Conventions
      • 56.1. Formatting
      • 56.2. Reporting Errors Within the Server
      • 56.3. Error Message Style Guide
      • 56.4. Miscellaneous Coding Conventions
    • 57. Native Language Support
      • 57.1. For the Translator
        • 57.1.1. Requirements
        • 57.1.2. Concepts
        • 57.1.3. Creating and Maintaining Message Catalogs
        • 57.1.4. Editing the PO Files
      • 57.2. For the Programmer
        • 57.2.1. Mechanics
        • 57.2.2. Message-Writing Guidelines
    • 58. Writing a Procedural Language Handler
    • 59. Writing a Foreign Data Wrapper
      • 59.1. Foreign Data Wrapper Functions
      • 59.2. Foreign Data Wrapper Callback Routines
        • 59.2.1. FDW Routines for Scanning Foreign Tables
        • 59.2.2. FDW Routines for Scanning Foreign Joins
        • 59.2.3. FDW Routines for Planning Post-Scan/Join Processing
        • 59.2.4. FDW Routines for Updating Foreign Tables
        • 59.2.5. FDW Routines for TRUNCATE
        • 59.2.6. FDW Routines for Row Locking
        • 59.2.7. FDW Routines for EXPLAIN
        • 59.2.8. FDW Routines for ANALYZE
        • 59.2.9. FDW Routines for IMPORT FOREIGN SCHEMA
        • 59.2.10. FDW Routines for Parallel Execution
        • 59.2.11. FDW Routines for Asynchronous Execution
        • 59.2.12. FDW Routines for Reparameterization of Paths
      • 59.3. Foreign Data Wrapper Helper Functions
      • 59.4. Foreign Data Wrapper Query Planning
      • 59.5. Row Locking in Foreign Data Wrappers
    • 60. Writing a Table Sampling Method
      • 60.1. Sampling Method Support Functions
    • 61. Writing a Custom Scan Provider
      • 61.1. Creating Custom Scan Paths
        • 61.1.1. Custom Scan Path Callbacks
      • 61.2. Creating Custom Scan Plans
        • 61.2.1. Custom Scan Plan Callbacks
      • 61.3. Executing Custom Scans
        • 61.3.1. Custom Scan Execution Callbacks
    • 62. Genetic Query Optimizer
      • 62.1. Query Handling as a Complex Optimization Problem
      • 62.2. Genetic Algorithms
      • 62.3. Genetic Query Optimization (GEQO) in PostgreSQL
        • 62.3.1. Generating Possible Plans with GEQO
        • 62.3.2. Future Implementation Tasks for PostgreSQL GEQO
      • 62.4. Further Reading
    • 63. Table Access Method Interface Definition
    • 64. Index Access Method Interface Definition
      • 64.1. Basic API Structure for Indexes
      • 64.2. Index Access Method Functions
      • 64.3. Index Scanning
      • 64.4. Index Locking Considerations
      • 64.5. Index Uniqueness Checks
      • 64.6. Index Cost Estimation Functions
    • 65. Generic WAL Records
    • 66. Custom WAL Resource Managers
    • 67. B-Tree Indexes
      • 67.1. Introduction
      • 67.2. Behavior of B-Tree Operator Classes
      • 67.3. B-Tree Support Functions
      • 67.4. Implementation
        • 67.4.1. B-Tree Structure
        • 67.4.2. Bottom-up Index Deletion
        • 67.4.3. Deduplication
    • 68. GiST Indexes
      • 68.1. Introduction
      • 68.2. Built-in Operator Classes
      • 68.3. Extensibility
      • 68.4. Implementation
        • 68.4.1. GiST Index Build Methods
      • 68.5. Examples
    • 69. SP-GiST Indexes
      • 69.1. Introduction
      • 69.2. Built-in Operator Classes
      • 69.3. Extensibility
      • 69.4. Implementation
        • 69.4.1. SP-GiST Limits
        • 69.4.2. SP-GiST Without Node Labels
        • 69.4.3. “All-the-Same” Inner Tuples
      • 69.5. Examples
    • 70. GIN Indexes
      • 70.1. Introduction
      • 70.2. Built-in Operator Classes
      • 70.3. Extensibility
      • 70.4. Implementation
        • 70.4.1. GIN Fast Update Technique
        • 70.4.2. Partial Match Algorithm
      • 70.5. GIN Tips and Tricks
      • 70.6. Limitations
      • 70.7. Examples
    • 71. BRIN Indexes
      • 71.1. Introduction
        • 71.1.1. Index Maintenance
      • 71.2. Built-in Operator Classes
        • 71.2.1. Operator Class Parameters
      • 71.3. Extensibility
    • 72. Hash Indexes
      • 72.1. Overview
      • 72.2. Implementation
    • 73. Database Physical Storage
      • 73.1. Database File Layout
      • 73.2. TOAST
        • 73.2.1. Out-of-Line, On-Disk TOAST Storage
        • 73.2.2. Out-of-Line, In-Memory TOAST Storage
      • 73.3. Free Space Map
      • 73.4. Visibility Map
      • 73.5. The Initialization Fork
      • 73.6. Database Page Layout
        • 73.6.1. Table Row Layout
      • 73.7. Heap-Only Tuples (HOT)
    • 74. Transaction Processing
      • 74.1. Transactions and Identifiers
      • 74.2. Transactions and Locking
      • 74.3. Subtransactions
      • 74.4. Two-Phase Transactions
    • 75. System Catalog Declarations and Initial Contents
      • 75.1. System Catalog Declaration Rules
      • 75.2. System Catalog Initial Data
        • 75.2.1. Data File Format
        • 75.2.2. OID Assignment
        • 75.2.3. OID Reference Lookup
        • 75.2.4. Automatic Creation of Array Types
        • 75.2.5. Recipes for Editing Data Files
      • 75.3. BKI File Format
      • 75.4. BKI Commands
      • 75.5. Structure of the Bootstrap BKI File
      • 75.6. BKI Example
    • 76. How the Planner Uses Statistics
      • 76.1. Row Estimation Examples
      • 76.2. Multivariate Statistics Examples
        • 76.2.1. Functional Dependencies
        • 76.2.2. Multivariate N-Distinct Counts
        • 76.2.3. MCV Lists
      • 76.3. Planner Statistics and Security
    • 77. Backup Manifest Format
      • 77.1. Backup Manifest Top-level Object
      • 77.2. Backup Manifest File Object
      • 77.3. Backup Manifest WAL Range Object
    • VIII. Appendixes
      • A. PostgreSQL Error Codes
      • B. Date/Time Support
        • B.1. Date/Time Input Interpretation
        • B.2. Handling of Invalid or Ambiguous Timestamps
        • B.3. Date/Time Key Words
        • B.4. Date/Time Configuration Files
        • B.5. POSIX Time Zone Specifications
        • B.6. History of Units
        • B.7. Julian Dates
      • C. SQL Key Words
      • D. SQL Conformance
        • D.1. Supported Features
        • D.2. Unsupported Features
        • D.3. XML Limits and Conformance to SQL/XML
      • E. Release Notes
        • E.1. Release 16.3
        • E.2. Release 16.2
        • E.3. Release 16.1
        • E.4. Release 16
        • E.5. Prior Releases
      • F. Additional Supplied Modules and Extensions
        • F.1. adminpack — pgAdmin support toolpack
        • F.2. amcheck — tools to verify table and index consistency
        • F.3. auth_delay — pause on authentication failure
        • F.4. auto_explain — log execution plans of slow queries
        • F.5. basebackup_to_shell — example "shell" pg_basebackup module
        • F.6. basic_archive — an example WAL archive module
        • F.7. bloom — bloom filter index access method
        • F.8. btree_gin — GIN operator classes with B-tree behavior
        • F.9. btree_gist — GiST operator classes with B-tree behavior
        • F.10. citext — a case-insensitive character string type
        • F.11. cube — a multi-dimensional cube data type
        • F.12. dblink — connect to other PostgreSQL databases
        • F.13. dict_int — example full-text search dictionary for integers
        • F.14. dict_xsyn — example synonym full-text search dictionary
        • F.15. earthdistance — calculate great-circle distances
        • F.16. file_fdw — access data files in the server’s file system
        • F.17. fuzzystrmatch — determine string similarities and distance
        • F.18. hstore — hstore key/value datatype
        • F.19. intagg — integer aggregator and enumerator
        • F.20. intarray — manipulate arrays of integers
        • F.21. isn — data types for international standard numbers (ISBN, EAN, UPC, etc.)
        • F.22. lo — manage large objects
        • F.23. ltree — hierarchical tree-like data type
        • F.24. old_snapshot — inspect old_snapshot_threshold state
        • F.25. pageinspect — low-level inspection of database pages
        • F.26. passwordcheck — verify password strength
        • F.27. pg_buffercache — inspect PostgreSQL buffer cache state
        • F.28. pgcrypto — cryptographic functions
        • F.29. pg_freespacemap — examine the free space map
        • F.30. pg_prewarm — preload relation data into buffer caches
        • F.31. pgrowlocks — show a table’s row locking information
        • F.32. pg_stat_statements — track statistics of SQL planning and execution
        • F.33. pgstattuple — obtain tuple-level statistics
        • F.34. pg_surgery — perform low-level surgery on relation data
        • F.35. pg_trgm — support for similarity of text using trigram matching
        • F.36. pg_visibility — visibility map information and utilities
        • F.37. pg_walinspect — low-level WAL inspection
        • F.38. postgres_fdw — access data stored in external PostgreSQL servers
        • F.39. seg — a datatype for line segments or floating point intervals
        • F.40. sepgsql — SELinux-, label-based mandatory access control (MAC) security module
        • F.41. spi — Server Programming Interface features/examples
        • F.42. sslinfo — obtain client SSL information
        • F.43. tablefunc — functions that return tables (crosstab and others)
        • F.44. tcn — a trigger function to notify listeners of changes to table content
        • F.45. test_decoding — SQL-based test/example module for WAL logical decoding
        • F.46. tsm_system_rows — the SYSTEM_ROWS sampling method for TABLESAMPLE
        • F.47. tsm_system_time — the SYSTEM_TIME sampling method for TABLESAMPLE
        • F.48. unaccent — a text search dictionary which removes diacritics
        • F.49. uuid-ossp — a UUID generator
        • F.50. xml2 — XPath querying and XSLT functionality
      • G. Additional Supplied Programs
        • G.1. Client Applications
        • G.2. Server Applications
      • H. External Projects
        • H.1. Client Interfaces
        • H.2. Administration Tools
        • H.3. Procedural Languages
        • H.4. Extensions
      • I. The Source Code Repository
        • I.1. Getting the Source via Git
      • J. Documentation
        • J.1. DocBook
        • J.2. Tool Sets
        • J.3. Building the Documentation with Make
        • J.4. Building the Documentation with Meson
        • J.5. Documentation Authoring
        • J.6. Style Guide
      • K. PostgreSQL Limits
      • L. Acronyms
      • M. Glossary
      • N. Color Support
        • N.1. When Color is Used
        • N.2. Configuring the Colors
      • O. Obsolete or Renamed Features
        • O.1. recovery.conf file merged into postgresql.conf
        • O.2. Default Roles Renamed to Predefined Roles
        • O.3. pg_xlogdump renamed to pg_waldump
        • O.4. pg_resetxlog renamed to pg_resetwal
        • O.5. pg_receivexlog renamed to pg_receivewal
    • A. PostgreSQL Error Codes
    • B. Date/Time Support
      • B.1. Date/Time Input Interpretation
      • B.2. Handling of Invalid or Ambiguous Timestamps
      • B.3. Date/Time Key Words
      • B.4. Date/Time Configuration Files
      • B.5. POSIX Time Zone Specifications
      • B.6. History of Units
      • B.7. Julian Dates
    • C. SQL Key Words
    • D. SQL Conformance
      • D.1. Supported Features
      • D.2. Unsupported Features
      • D.3. XML Limits and Conformance to SQL/XML
        • D.3.1. Queries Are Restricted to XPath 1.0
        • D.3.2. Incidental Limits of the Implementation
    • E. Release Notes
      • E.1. Release 16.3
        • E.1.1. Migration to Version 16.3
        • E.1.2. Changes
      • E.2. Release 16.2
        • E.2.1. Migration to Version 16.2
        • E.2.2. Changes
      • E.3. Release 16.1
        • E.3.1. Migration to Version 16.1
        • E.3.2. Changes
      • E.4. Release 16
        • E.4.1. Overview
        • E.4.2. Migration to Version 16
        • E.4.3. Changes
        • E.4.4. Acknowledgments
      • E.5. Prior Releases
    • F. Additional Supplied Modules and Extensions
      • F.1. adminpack — pgAdmin support toolpack
      • F.2. amcheck — tools to verify table and index consistency
        • F.2.1. Functions
        • F.2.2. Optional heapallindexed Verification
        • F.2.3. Using amcheck Effectively
        • F.2.4. Repairing Corruption
      • F.3. auth_delay — pause on authentication failure
        • F.3.1. Configuration Parameters
        • F.3.2. Author
      • F.4. auto_explain — log execution plans of slow queries
        • F.4.1. Configuration Parameters
        • F.4.2. Example
        • F.4.3. Author
      • F.5. basebackup_to_shell — example "shell" pg_basebackup module
        • F.5.1. Configuration Parameters
        • F.5.2. Author
      • F.6. basic_archive — an example WAL archive module
        • F.6.1. Configuration Parameters
        • F.6.2. Notes
        • F.6.3. Author
      • F.7. bloom — bloom filter index access method
        • F.7.1. Parameters
        • F.7.2. Examples
        • F.7.3. Operator Class Interface
        • F.7.4. Limitations
        • F.7.5. Authors
      • F.8. btree_gin — GIN operator classes with B-tree behavior
        • F.8.1. Example Usage
        • F.8.2. Authors
      • F.9. btree_gist — GiST operator classes with B-tree behavior
        • F.9.1. Example Usage
        • F.9.2. Authors
      • F.10. citext — a case-insensitive character string type
        • F.10.1. Rationale
        • F.10.2. How to Use It
        • F.10.3. String Comparison Behavior
        • F.10.4. Limitations
        • F.10.5. Author
      • F.11. cube — a multi-dimensional cube data type
        • F.11.1. Syntax
        • F.11.2. Precision
        • F.11.3. Usage
        • F.11.4. Defaults
        • F.11.5. Notes
        • F.11.6. Credits
      • F.12. dblink — connect to other PostgreSQL databases
        • dblink_connect
        • dblink_connect_u
        • dblink_disconnect
        • dblink
        • dblink_exec
        • dblink_open
        • dblink_fetch
        • dblink_close
        • dblink_get_connections
        • dblink_error_message
        • dblink_send_query
        • dblink_is_busy
        • dblink_get_notify
        • dblink_get_result
        • dblink_cancel_query
        • dblink_get_pkey
        • dblink_build_sql_insert
        • dblink_build_sql_delete
        • dblink_build_sql_update
      • F.13. dict_int — example full-text search dictionary for integers
        • F.13.1. Configuration
        • F.13.2. Usage
      • F.14. dict_xsyn — example synonym full-text search dictionary
        • F.14.1. Configuration
        • F.14.2. Usage
      • F.15. earthdistance — calculate great-circle distances
        • F.15.1. Cube-Based Earth Distances
        • F.15.2. Point-Based Earth Distances
      • F.16. file_fdw — access data files in the server’s file system
      • F.17. fuzzystrmatch — determine string similarities and distance
        • F.17.1. Soundex
        • F.17.2. Daitch-Mokotoff Soundex
        • F.17.3. Levenshtein
        • F.17.4. Metaphone
        • F.17.5. Double Metaphone
      • F.18. hstore — hstore key/value datatype
        • F.18.1. hstore External Representation
        • F.18.2. hstore Operators and Functions
        • F.18.3. Indexes
        • F.18.4. Examples
        • F.18.5. Statistics
        • F.18.6. Compatibility
        • F.18.7. Transforms
        • F.18.8. Authors
      • F.19. intagg — integer aggregator and enumerator
        • F.19.1. Functions
        • F.19.2. Sample Uses
      • F.20. intarray — manipulate arrays of integers
        • F.20.1. intarray Functions and Operators
        • F.20.2. Index Support
        • F.20.3. Example
        • F.20.4. Benchmark
        • F.20.5. Authors
      • F.21. isn — data types for international standard numbers (ISBN, EAN, UPC, etc.)
        • F.21.1. Data Types
        • F.21.2. Casts
        • F.21.3. Functions and Operators
        • F.21.4. Examples
        • F.21.5. Bibliography
        • F.21.6. Author
      • F.22. lo — manage large objects
        • F.22.1. Rationale
        • F.22.2. How to Use It
        • F.22.3. Limitations
        • F.22.4. Author
      • F.23. ltree — hierarchical tree-like data type
        • F.23.1. Definitions
        • F.23.2. Operators and Functions
        • F.23.3. Indexes
        • F.23.4. Example
        • F.23.5. Transforms
        • F.23.6. Authors
      • F.24. old_snapshot — inspect old_snapshot_threshold state
        • F.24.1. Functions
      • F.25. pageinspect — low-level inspection of database pages
        • F.25.1. General Functions
        • F.25.2. Heap Functions
        • F.25.3. B-Tree Functions
        • F.25.4. BRIN Functions
        • F.25.5. GIN Functions
        • F.25.6. GiST Functions
        • F.25.7. Hash Functions
      • F.26. passwordcheck — verify password strength
      • F.27. pg_buffercache — inspect PostgreSQL buffer cache state
        • F.27.1. The pg_buffercache View
        • F.27.2. The pg_buffercache_summary() Function
        • F.27.3. The pg_buffercache_usage_counts() Function
        • F.27.4. Sample Output
        • F.27.5. Authors
      • F.28. pgcrypto — cryptographic functions
        • F.28.1. General Hashing Functions
        • F.28.2. Password Hashing Functions
        • F.28.3. PGP Encryption Functions
        • F.28.4. Raw Encryption Functions
        • F.28.5. Random-Data Functions
        • F.28.6. Notes
        • F.28.7. Author
      • F.29. pg_freespacemap — examine the free space map
        • F.29.1. Functions
        • F.29.2. Sample Output
        • F.29.3. Author
      • F.30. pg_prewarm — preload relation data into buffer caches
        • F.30.1. Functions
        • F.30.2. Configuration Parameters
        • F.30.3. Author
      • F.31. pgrowlocks — show a table’s row locking information
        • F.31.1. Overview
        • F.31.2. Sample Output
        • F.31.3. Author
      • F.32. pg_stat_statements — track statistics of SQL planning and execution
        • F.32.1. The pg_stat_statements View
        • F.32.2. The pg_stat_statements_info View
        • F.32.3. Functions
        • F.32.4. Configuration Parameters
        • F.32.5. Sample Output
        • F.32.6. Authors
      • F.33. pgstattuple — obtain tuple-level statistics
        • F.33.1. Functions
        • F.33.2. Authors
      • F.34. pg_surgery — perform low-level surgery on relation data
        • F.34.1. Functions
        • F.34.2. Authors
      • F.35. pg_trgm — support for similarity of text using trigram matching
        • F.35.1. Trigram (or Trigraph) Concepts
        • F.35.2. Functions and Operators
        • F.35.3. GUC Parameters
        • F.35.4. Index Support
        • F.35.5. Text Search Integration
        • F.35.6. References
        • F.35.7. Authors
      • F.36. pg_visibility — visibility map information and utilities
        • F.36.1. Functions
        • F.36.2. Author
      • F.37. pg_walinspect — low-level WAL inspection
        • F.37.1. General Functions
        • F.37.2. Author
      • F.38. postgres_fdw — access data stored in external PostgreSQL servers
        • F.38.1. FDW Options of postgres_fdw
        • F.38.2. Functions
        • F.38.3. Connection Management
        • F.38.4. Transaction Management
        • F.38.5. Remote Query Optimization
        • F.38.6. Remote Query Execution Environment
        • F.38.7. Cross-Version Compatibility
        • F.38.8. Configuration Parameters
        • F.38.9. Examples
        • F.38.10. Author
      • F.39. seg — a datatype for line segments or floating point intervals
        • F.39.1. Rationale
        • F.39.2. Syntax
        • F.39.3. Precision
        • F.39.4. Usage
        • F.39.5. Notes
        • F.39.6. Credits
      • F.40. sepgsql — SELinux-, label-based mandatory access control (MAC) security module
        • F.40.1. Overview
        • F.40.2. Installation
        • F.40.3. Regression Tests
        • F.40.4. GUC Parameters
        • F.40.5. Features
        • F.40.6. Sepgsql Functions
        • F.40.7. Limitations
        • F.40.8. External Resources
        • F.40.9. Author
      • F.41. spi — Server Programming Interface features/examples
        • F.41.1. refint — Functions for Implementing Referential Integrity
        • F.41.2. autoinc — Functions for Autoincrementing Fields
        • F.41.3. insert_username — Functions for Tracking Who Changed a Table
        • F.41.4. moddatetime — Functions for Tracking Last Modification Time
      • F.42. sslinfo — obtain client SSL information
        • F.42.1. Functions Provided
        • F.42.2. Author
      • F.43. tablefunc — functions that return tables (crosstab and others)
        • F.43.1. Functions Provided
        • F.43.2. Author
      • F.44. tcn — a trigger function to notify listeners of changes to table content
      • F.45. test_decoding — SQL-based test/example module for WAL logical decoding
      • F.46. tsm_system_rows — the SYSTEM_ROWS sampling method for TABLESAMPLE
        • F.46.1. Examples
      • F.47. tsm_system_time — the SYSTEM_TIME sampling method for TABLESAMPLE
        • F.47.1. Examples
      • F.48. unaccent — a text search dictionary which removes diacritics
        • F.48.1. Configuration
        • F.48.2. Usage
        • F.48.3. Functions
      • F.49. uuid-ossp — a UUID generator
        • F.49.1. uuid-ossp Functions
        • F.49.2. Building uuid-ossp
        • F.49.3. Author
      • F.50. xml2 — XPath querying and XSLT functionality
        • F.50.1. Deprecation Notice
        • F.50.2. Description of Functions
        • F.50.3. xpath_table
        • F.50.4. XSLT Functions
        • F.50.5. Author
    • G. Additional Supplied Programs
      • G.1. Client Applications
        • oid2name
        • vacuumlo
      • G.2. Server Applications
    • H. External Projects
      • H.1. Client Interfaces
      • H.2. Administration Tools
      • H.3. Procedural Languages
      • H.4. Extensions
    • I. The Source Code Repository
      • I.1. Getting the Source via Git
    • J. Documentation
      • J.1. DocBook
      • J.2. Tool Sets
        • J.2.1. Installation on Fedora, RHEL, and Derivatives
        • J.2.2. Installation on FreeBSD
        • J.2.3. Debian Packages
        • J.2.4. macOS
        • J.2.5. Detection by configure
      • J.3. Building the Documentation with Make
        • J.3.1. HTML
        • J.3.2. Manpages
        • J.3.3. PDF
        • J.3.4. Plain Text Files
        • J.3.5. Syntax Check
      • J.4. Building the Documentation with Meson
      • J.5. Documentation Authoring
        • J.5.1. Emacs
      • J.6. Style Guide
        • J.6.1. Reference Pages
    • K. PostgreSQL Limits
    • L. Acronyms
    • M. Glossary
    • N. Color Support
      • N.1. When Color is Used
      • N.2. Configuring the Colors
    • O. Obsolete or Renamed Features
      • O.1. recovery.conf file merged into postgresql.conf
      • O.2. Default Roles Renamed to Predefined Roles
      • O.3. pg_xlogdump renamed to pg_waldump
      • O.4. pg_resetxlog renamed to pg_resetwal
      • O.5. pg_receivexlog renamed to pg_receivewal
    • Bibliography
    • Index
  • Postgresql 中文操作指南
  • I. Tutorial
  • 3. Advanced Features

Postgresql 中文操作指南

Chapter 3. Advanced Features

Table of Contents

  • Postgresql 中文操作指南
    • defaultcurrent

粤ICP备2024239452号-1