]> begriffs open source - ai-pg/blob - full-docs/txt/ecpg.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / ecpg.txt
1
2 Chapter 34. ECPG — Embedded SQL in C
3
4    Table of Contents
5
6    34.1. The Concept
7    34.2. Managing Database Connections
8
9         34.2.1. Connecting to the Database Server
10         34.2.2. Choosing a Connection
11         34.2.3. Closing a Connection
12
13    34.3. Running SQL Commands
14
15         34.3.1. Executing SQL Statements
16         34.3.2. Using Cursors
17         34.3.3. Managing Transactions
18         34.3.4. Prepared Statements
19
20    34.4. Using Host Variables
21
22         34.4.1. Overview
23         34.4.2. Declare Sections
24         34.4.3. Retrieving Query Results
25         34.4.4. Type Mapping
26         34.4.5. Handling Nonprimitive SQL Data Types
27         34.4.6. Indicators
28
29    34.5. Dynamic SQL
30
31         34.5.1. Executing Statements without a Result Set
32         34.5.2. Executing a Statement with Input Parameters
33         34.5.3. Executing a Statement with a Result Set
34
35    34.6. pgtypes Library
36
37         34.6.1. Character Strings
38         34.6.2. The numeric Type
39         34.6.3. The date Type
40         34.6.4. The timestamp Type
41         34.6.5. The interval Type
42         34.6.6. The decimal Type
43         34.6.7. errno Values of pgtypeslib
44         34.6.8. Special Constants of pgtypeslib
45
46    34.7. Using Descriptor Areas
47
48         34.7.1. Named SQL Descriptor Areas
49         34.7.2. SQLDA Descriptor Areas
50
51    34.8. Error Handling
52
53         34.8.1. Setting Callbacks
54         34.8.2. sqlca
55         34.8.3. SQLSTATE vs. SQLCODE
56
57    34.9. Preprocessor Directives
58
59         34.9.1. Including Files
60         34.9.2. The define and undef Directives
61         34.9.3. ifdef, ifndef, elif, else, and endif Directives
62
63    34.10. Processing Embedded SQL Programs
64    34.11. Library Functions
65    34.12. Large Objects
66    34.13. C++ Applications
67
68         34.13.1. Scope for Host Variables
69         34.13.2. C++ Application Development with External C Module
70
71    34.14. Embedded SQL Commands
72
73         ALLOCATE DESCRIPTOR — allocate an SQL descriptor area
74         CONNECT — establish a database connection
75         DEALLOCATE DESCRIPTOR — deallocate an SQL descriptor area
76         DECLARE — define a cursor
77         DECLARE STATEMENT — declare SQL statement identifier
78         DESCRIBE — obtain information about a prepared statement or result
79                 set
80
81         DISCONNECT — terminate a database connection
82         EXECUTE IMMEDIATE — dynamically prepare and execute a statement
83         GET DESCRIPTOR — get information from an SQL descriptor area
84         OPEN — open a dynamic cursor
85         PREPARE — prepare a statement for execution
86         SET AUTOCOMMIT — set the autocommit behavior of the current
87                 session
88
89         SET CONNECTION — select a database connection
90         SET DESCRIPTOR — set information in an SQL descriptor area
91         TYPE — define a new data type
92         VAR — define a variable
93         WHENEVER — specify the action to be taken when an SQL statement
94                 causes a specific class condition to be raised
95
96    34.15. Informix Compatibility Mode
97
98         34.15.1. Additional Types
99         34.15.2. Additional/Missing Embedded SQL Statements
100         34.15.3. Informix-compatible SQLDA Descriptor Areas
101         34.15.4. Additional Functions
102         34.15.5. Additional Constants
103
104    34.16. Oracle Compatibility Mode
105    34.17. Internals
106
107    This chapter describes the embedded SQL package for PostgreSQL. It was
108    written by Linus Tolke (<linus@epact.se>) and Michael Meskes
109    (<meskes@postgresql.org>). Originally it was written to work with C. It
110    also works with C++, but it does not recognize all C++ constructs yet.
111
112    This documentation is quite incomplete. But since this interface is
113    standardized, additional information can be found in many resources
114    about SQL.