Chapter 37. ECPG — Embedded SQL in C
Table of Contents
- 37.1. The Concept
- 37.2. Managing Database Connections
- 37.3. Running SQL Commands
- 37.4. Using Host Variables
- 37.5. Dynamic SQL
- 37.6. pgtypes Library
- 37.7. Using Descriptor Areas
- 37.8. Error Handling
- 37.9. Preprocessor Directives
- 37.10. Processing Embedded SQL Programs
- 37.11. Library Functions
- 37.12. Large Objects
- 37.13. C++ Applications
- 37.11. Library Functions
- 37.14. Embedded SQL Commands
- ALLOCATE DESCRIPTOR — allocate an SQL descriptor area
- CONNECT — establish a database connection
- DEALLOCATE DESCRIPTOR — deallocate an SQL descriptor area
- DECLARE — define a cursor
- DECLARE STATEMENT — declare SQL statement identifier
- DESCRIBE — obtain information about a prepared statement or result set
- DISCONNECT — terminate a database connection
- EXECUTE IMMEDIATE — dynamically prepare and execute a statement
- GET DESCRIPTOR — get information from an SQL descriptor area
- OPEN — open a dynamic cursor
- PREPARE — prepare a statement for execution
- SET AUTOCOMMIT — set the autocommit behavior of the current session
- SET CONNECTION — select a database connection
- SET DESCRIPTOR — set information in an SQL descriptor area
- TYPE — define a new data type
- VAR — define a variable
- WHENEVER — specify the action to be taken when an SQL statement causes a specific class condition to be raised
- CONNECT — establish a database connection
- ALLOCATE DESCRIPTOR — allocate an SQL descriptor area
- 37.15. Informix Compatibility Mode
- 37.16. Oracle Compatibility Mode
- 37.17. Internals
This chapter describes the embedded SQL package for Postgres Pro. It was written by Linus Tolke (<linus@epact.se>
) and Michael Meskes (<meskes@postgresql.org>
). 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.