Client Interfaces

This part describes the client programming interfaces distributed with PostgreSQL. Each of these chapters can be read independently. Note that there are many other programming interfaces for client programs that are distributed separately and contain their own documentation. Readers of this part should be familiar with using SQL commands to manipulate and query the database (see Part II, “The SQL Language”) and of course with the programming language that the interface uses.

Table of Contents

27. libpq - C Library
27.1. Database Connection Control Functions
27.2. Connection Status Functions
27.3. Command Execution Functions
27.3.1. Main Functions
27.3.2. Retrieving Query Result Information
27.3.3. Retrieving Result Information for Other Commands
27.3.4. Escaping Strings for Inclusion in SQL Commands
27.3.5. Escaping Binary Strings for Inclusion in SQL Commands
27.4. Asynchronous Command Processing
27.5. Cancelling Queries in Progress
27.6. The Fast-Path Interface
27.7. Asynchronous Notification
27.8. Functions Associated with the COPY Command
27.8.1. Functions for Sending COPY Data
27.8.2. Functions for Receiving COPY Data
27.8.3. Obsolete Functions for COPY
27.9. Control Functions
27.10. Notice Processing
27.11. Environment Variables
27.12. The Password File
27.13. SSL Support
27.14. Behavior in Threaded Programs
27.15. Building libpq Programs
27.16. Example Programs
28. Large Objects
28.1. History
28.2. Implementation Features
28.3. Client Interfaces
28.3.1. Creating a Large Object
28.3.2. Importing a Large Object
28.3.3. Exporting a Large Object
28.3.4. Opening an Existing Large Object
28.3.5. Writing Data to a Large Object
28.3.6. Reading Data from a Large Object
28.3.7. Seeking on a Large Object
28.3.8. Obtaining the Seek Position of a Large Object
28.3.9. Closing a Large Object Descriptor
28.3.10. Removing a Large Object
28.4. Server-Side Functions
28.5. Example Program
29. ECPG - Embedded SQL in C
29.1. The Concept
29.2. Connecting to the Database Server
29.3. Closing a Connection
29.4. Running SQL Commands
29.5. Choosing a Connection
29.6. Using Host Variables
29.6.1. Overview
29.6.2. Declare Sections
29.6.3. SELECT INTO and FETCH INTO
29.6.4. Indicators
29.7. Dynamic SQL
29.8. Using SQL Descriptor Areas
29.9. Error Handling
29.9.1. Setting Callbacks
29.9.2. sqlca
29.9.3. SQLSTATE vs SQLCODE
29.10. Including Files
29.11. Processing Embedded SQL Programs
29.12. Library Functions
29.13. Internals
30. The Information Schema
30.1. The Schema
30.2. Data Types
30.3. information_schema_catalog_name
30.4. applicable_roles
30.5. check_constraints
30.6. column_domain_usage
30.7. column_privileges
30.8. column_udt_usage
30.9. columns
30.10. constraint_column_usage
30.11. constraint_table_usage
30.12. data_type_privileges
30.13. domain_constraints
30.14. domain_udt_usage
30.15. domains
30.16. element_types
30.17. enabled_roles
30.18. key_column_usage
30.19. parameters
30.20. referential_constraints
30.21. role_column_grants
30.22. role_routine_grants
30.23. role_table_grants
30.24. role_usage_grants
30.25. routine_privileges
30.26. routines
30.27. schemata
30.28. sql_features
30.29. sql_implementation_info
30.30. sql_languages
30.31. sql_packages
30.32. sql_sizing
30.33. sql_sizing_profiles
30.34. table_constraints
30.35. table_privileges
30.36. tables
30.37. triggers
30.38. usage_privileges
30.39. view_column_usage
30.40. view_table_usage
30.41. views