Chapter 32. ECPG - Embedded SQL in C

Table of Contents
32.1. The Concept
32.2. Connecting to the Database Server
32.3. Closing a Connection
32.4. Running SQL Commands
32.5. Choosing a Connection
32.6. Using Host Variables
32.6.1. Overview
32.6.2. Declare Sections
32.6.3. Different types of host variables
32.6.4. SELECT INTO and FETCH INTO
32.6.5. Indicators
32.7. Dynamic SQL
32.8. pgtypes library
32.8.1. The numeric type
32.8.2. The date type
32.8.3. The timestamp type
32.8.4. The interval type
32.8.5. The decimal type
32.8.6. errno values of pgtypeslib
32.8.7. Special constants of pgtypeslib
32.9. Informix compatibility mode
32.9.1. Additional embedded SQL statements
32.9.2. Additional functions
32.9.3. Additional constants
32.10. Using SQL Descriptor Areas
32.11. Error Handling
32.11.1. Setting Callbacks
32.11.2. sqlca
32.11.3. SQLSTATE vs SQLCODE
32.12. Preprocessor directives
32.12.1. Including files
32.12.2. The #define and #undef directives
32.12.3. ifdef, ifndef, else, elif and endif directives
32.13. Processing Embedded SQL Programs
32.14. Library Functions
32.15. Internals

This chapter describes the embedded SQL package for PostgreSQL. It was written by Linus Tolke () and Michael Meskes (). Originally it was written to work with C. It also works with C++, but it does not recognize all C++ constructs yet.

This documentation is quite incomplete. But since this interface is standardized, additional information can be found in many resources about SQL.