Chapter 30. ECPG - Embedded SQL in C

Table of Contents
30.1. The Concept
30.2. Connecting to the Database Server
30.3. Closing a Connection
30.4. Running SQL Commands
30.5. Choosing a Connection
30.6. Using Host Variables
30.6.1. Overview
30.6.2. Declare Sections
30.6.3. Different types of host variables
30.6.4. SELECT INTO and FETCH INTO
30.6.5. Indicators
30.7. Dynamic SQL
30.8. pgtypes library
30.8.1. The numeric type
30.8.2. The date type
30.8.3. The timestamp type
30.8.4. The interval type
30.8.5. The decimal type
30.8.6. errno values of pgtypeslib
30.8.7. Special constants of pgtypeslib
30.9. Informix compatibility mode
30.9.1. Additional embedded SQL statements
30.9.2. Additional functions
30.9.3. Additional constants
30.10. Using SQL Descriptor Areas
30.11. Error Handling
30.11.1. Setting Callbacks
30.11.2. sqlca
30.11.3. SQLSTATE vs SQLCODE
30.12. Preprocessor directives
30.12.1. Including files
30.12.2. The #define and #undef directives
30.12.3. ifdef, ifndef, else, elif and endif directives
30.13. Processing Embedded SQL Programs
30.14. Library Functions
30.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.