aboutsummaryrefslogtreecommitdiff
path: root/doc/src/sgml/ecpg.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/sgml/ecpg.sgml')
-rw-r--r--doc/src/sgml/ecpg.sgml110
1 files changed, 55 insertions, 55 deletions
diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index 83f396ad21a..37bc43f49a7 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -82,7 +82,7 @@ EXEC SQL ...;
</para>
<sect2 id="ecpg-connecting">
- <title>Connecting to the database server</title>
+ <title>Connecting to the Database Server</title>
<para>
One connects to a database using the following statement:
@@ -214,7 +214,7 @@ EXEC SQL CONNECT TO :target USER :user;
</sect2>
<sect2 id="ecpg-set-connection">
- <title>Choosing a connection</title>
+ <title>Choosing a Connection</title>
<para>
SQL statements in embedded SQL programs are by default executed on
@@ -295,7 +295,7 @@ current=testdb1 (should be testdb1)
</sect2>
<sect2 id="ecpg-disconnect">
- <title>Closing a connection</title>
+ <title>Closing a Connection</title>
<para>
To close a connection, use the following statement:
@@ -352,7 +352,7 @@ EXEC SQL DISCONNECT <optional><replaceable>connection</replaceable></optional>;
</para>
<sect2 id="ecpg-executing">
- <title>Executing SQL statements</title>
+ <title>Executing SQL Statements</title>
<para>
Creating a table:
@@ -424,7 +424,7 @@ EXEC SQL SHOW search_path INTO :var;
</sect2>
<sect2 id="ecpg-cursors">
- <title>Using cursors</title>
+ <title>Using Cursors</title>
<para>
To retrieve a result set holding multiple rows, an application has
@@ -466,7 +466,7 @@ EXEC SQL COMMIT;
</sect2>
<sect2 id="ecpg-transactions">
- <title>Managing transactions</title>
+ <title>Managing Transactions</title>
<para>
In the default mode, statements are committed only when
@@ -525,7 +525,7 @@ EXEC SQL COMMIT;
</sect2>
<sect2 id="ecpg-prepared">
- <title>Prepared statements</title>
+ <title>Prepared Statements</title>
<para>
When the values to be passed to an SQL statement are not known at
@@ -696,7 +696,7 @@ EXEC SQL int i = 4;
</sect2>
<sect2 id="ecpg-retrieving">
- <title>Retrieving query results</title>
+ <title>Retrieving Query Results</title>
<para>
Now you should be able to pass data generated by your program into
@@ -768,7 +768,7 @@ do
</sect2>
<sect2 id="ecpg-variables-type-mapping">
- <title>Type mapping</title>
+ <title>Type Mapping</title>
<para>
When ECPG applications exchange values between the PostgreSQL
@@ -799,7 +799,7 @@ do
</para>
<table id="ecpg-datatype-hostvars-table">
- <title>Mapping between PostgreSQL data types and C variable types</title>
+ <title>Mapping Between PostgreSQL Data Types and C Variable Types</title>
<tgroup cols="2">
<thead>
<row>
@@ -893,7 +893,7 @@ do
</table>
<sect3 id="ecpg-char">
- <title>Handling character strings</title>
+ <title>Handling Character Strings</title>
<para>
To handle SQL character string data types, such
@@ -967,7 +967,7 @@ VARCHAR v2[128];
</sect3>
<sect3 id="ecpg-special-types">
- <title>Accessing special data types</title>
+ <title>Accessing Special Data Types</title>
<para>
ECPG contains some special types that help you to interact easily
@@ -1158,7 +1158,7 @@ EXEC SQL END DECLARE SECTION;
</sect3>
<sect3 id="ecpg-variables-nonprimitive-c">
- <title>Host variables with nonprimitive types</title>
+ <title>Host Variables with Nonprimitive Types</title>
<para>
As a host variable you can also use arrays, typedefs, structs, and
@@ -1374,7 +1374,7 @@ EXEC SQL END DECLARE SECTION;
</sect2>
<sect2 id="ecpg-variables-nonprimitive-sql">
- <title>Handling nonprimitive SQL data types</title>
+ <title>Handling Nonprimitive SQL Data Types</title>
<para>
This section contains information on how to handle nonscalar and
@@ -1504,7 +1504,7 @@ while (1)
</sect3>
<sect3>
- <title>Composite types</title>
+ <title>Composite Types</title>
<para>
Composite types are not directly supported in ECPG, but an easy workaround is possible.
@@ -1624,7 +1624,7 @@ while (1)
</sect3>
<sect3>
- <title>User-defined base types</title>
+ <title>User-Defined Base Types</title>
<para>
New user-defined base types are not directly supported by ECPG.
@@ -1772,7 +1772,7 @@ EXEC SQL SELECT b INTO :val :val_ind FROM test1;
</para>
<sect2 id="ecpg-dynamic-without-result">
- <title>Executing statements without a result set</title>
+ <title>Executing Statements without a Result Set</title>
<para>
The simplest way to execute an arbitrary SQL statement is to use
@@ -1794,7 +1794,7 @@ EXEC SQL EXECUTE IMMEDIATE :stmt;
</sect2>
<sect2 id="ecpg-dynamic-input">
- <title>Executing a statement with input parameters</title>
+ <title>Executing a Statement with Input Parameters</title>
<para>
A more powerful way to execute arbitrary SQL statements is to
@@ -1825,7 +1825,7 @@ EXEC SQL DEALLOCATE PREPARE <replaceable>name</replaceable>;
</sect2>
<sect2 id="ecpg-dynamic-with-result">
- <title>Executing a statement with a result set</title>
+ <title>Executing a Statement with a Result Set</title>
<para>
To execute an SQL statement with a single result row,
@@ -1887,7 +1887,7 @@ EXEC SQL DISCONNECT ALL;
</sect1>
<sect1 id="ecpg-pgtypes">
- <title>pgtypes library</title>
+ <title>pgtypes Library</title>
<para>
The pgtypes library maps <productname>PostgreSQL</productname> database
@@ -1914,7 +1914,7 @@ free(out);
</para>
<sect2 id="ecpg-pgtypes-numeric">
- <title>The numeric type</title>
+ <title>The numeric Type</title>
<para>
The numeric type offers to do calculations with arbitrary precision. See
<xref linkend="datatype-numeric"> for the equivalent type in the
@@ -2237,7 +2237,7 @@ int PGTYPESnumeric_from_decimal(decimal *src, numeric *dst);
</sect2>
<sect2 id="ecpg-pgtypes-date">
- <title>The date type</title>
+ <title>The date Type</title>
<para>
The date type in C enables your programs to deal with data of the SQL type
date. See <xref linkend="datatype-datetime"> for the equivalent type in the
@@ -2282,7 +2282,7 @@ date PGTYPESdate_from_asc(char *str, char **endptr);
<xref linkend="ecpg-pgtypesdate-from-asc-table"> shows the allowed input formats.
</para>
<table id="ecpg-pgtypesdate-from-asc-table">
- <title>Valid input formats for <function>PGTYPESdate_from_asc</function></title>
+ <title>Valid Input Formats for <function>PGTYPESdate_from_asc</function></title>
<tgroup cols="2">
<thead>
<row>
@@ -2539,7 +2539,7 @@ int PGTYPESdate_fmt_asc(date dDate, char *fmtstring, char *outbuf);
the same date: November 23, 1959.
</para>
<table id="ecpg-pgtypesdate-fmt-asc-example-table">
- <title>Valid input formats for <function>PGTYPESdate_fmt_asc</function></title>
+ <title>Valid Input Formats for <function>PGTYPESdate_fmt_asc</function></title>
<tgroup cols="2">
<thead>
<row>
@@ -2629,7 +2629,7 @@ int PGTYPESdate_defmt_asc(date *d, char *fmt, char *str);
you an idea of how to use this function.
</para>
<table id="ecpg-rdefmtdate-example-table">
- <title>Valid input formats for <function>rdefmtdate</function></title>
+ <title>Valid Input Formats for <function>rdefmtdate</function></title>
<tgroup cols="3">
<thead>
<row>
@@ -2714,7 +2714,7 @@ int PGTYPESdate_defmt_asc(date *d, char *fmt, char *str);
</sect2>
<sect2 id="ecpg-pgtypes-timestamp">
- <title>The timestamp type</title>
+ <title>The timestamp Type</title>
<para>
The timestamp type in C enables your programs to deal with data of the SQL
type timestamp. See <xref linkend="datatype-datetime"> for the equivalent
@@ -2756,7 +2756,7 @@ timestamp PGTYPEStimestamp_from_asc(char *str, char **endptr);
<xref linkend="ecpg-pgtypestimestamp-from-asc-example-table"> contains a few examples for input strings.
</para>
<table id="ecpg-pgtypestimestamp-from-asc-example-table">
- <title>Valid input formats for <function>PGTYPEStimestamp_from_asc</function></title>
+ <title>Valid Input Formats for <function>PGTYPEStimestamp_from_asc</function></title>
<tgroup cols="2">
<thead>
<row>
@@ -3243,7 +3243,7 @@ int PGTYPEStimestamp_sub_interval(timestamp *tin, interval *span, timestamp *tou
</sect2>
<sect2 id="ecpg-pgtypes-interval">
- <title>The interval type</title>
+ <title>The interval Type</title>
<para>
The interval type in C enables your programs to deal with data of the SQL
type interval. See <xref linkend="datatype-datetime"> for the equivalent
@@ -3330,7 +3330,7 @@ int PGTYPESinterval_copy(interval *intvlsrc, interval *intvldest);
</sect2>
<sect2 id="ecpg-pgtypes-decimal">
- <title>The decimal type</title>
+ <title>The decimal Type</title>
<para>
The decimal type is similar to the numeric type. However it is limited to
a maximum precision of 30 significant digits. In contrast to the numeric
@@ -3374,7 +3374,7 @@ void PGTYPESdecimal_free(decimal *var);
</sect2>
<sect2 id="ecpg-pgtypes-errno">
- <title>errno values of pgtypeslib</title>
+ <title>errno Values of pgtypeslib</title>
<para>
<variablelist>
<varlistentry>
@@ -3516,7 +3516,7 @@ void PGTYPESdecimal_free(decimal *var);
</sect2>
<sect2 id="ecpg-pgtypes-constants">
- <title>Special constants of pgtypeslib</title>
+ <title>Special Constants of pgtypeslib</title>
<para>
<variablelist>
<varlistentry id="PGTYPESInvalidTimestamp">
@@ -3557,7 +3557,7 @@ void PGTYPESdecimal_free(decimal *var);
</para>
<sect2 id="ecpg-named-descriptors">
- <title>Named SQL descriptor areas</title>
+ <title>Named SQL Descriptor Areas</title>
<para>
A named SQL descriptor area consists of a header, which contains
@@ -3815,7 +3815,7 @@ EXEC SQL GET DESCRIPTOR mydesc VALUE 1 :id = DATA;
</sect2>
<sect2 id="ecpg-sqlda-descriptors">
- <title>SQLDA descriptor areas</title>
+ <title>SQLDA Descriptor Areas</title>
<para>
An SQLDA Descriptor Area is a C language structure which can be also used
@@ -3852,7 +3852,7 @@ EXEC SQL DESCRIBE prepared_statement INTO mysqlda;
</procedure>
<sect3>
- <title>SQLDA data structure</title>
+ <title>SQLDA Datac Structure</title>
<para>
SQLDA uses three data structure
@@ -3869,7 +3869,7 @@ EXEC SQL DESCRIBE prepared_statement INTO mysqlda;
</tip>
<sect4 id="ecpg-sqlda-sqlda">
- <title>sqlda_t structure</title>
+ <title>sqlda_t Structure</title>
<para>
The structure type <type>sqlda_t</type> is the type of the
@@ -3966,7 +3966,7 @@ typedef struct sqlda_struct sqlda_t;
</sect4>
<sect4 id="ecpg-sqlda-sqlvar">
- <title>sqlvar_t structure</title>
+ <title>sqlvar_t Structure</title>
<para>
The structure type <type>sqlvar_t</type> holds a column value
@@ -4041,7 +4041,7 @@ typedef struct sqlvar_struct sqlvar_t;
</sect4>
<sect4 id="ecpg-sqlda-sqlname">
- <title>struct sqlname structure</title>
+ <title>struct sqlname Structure</title>
<para>
A <type>struct sqlname</type> structure holds a column name. It
@@ -4080,7 +4080,7 @@ struct sqlname
</sect3>
<sect3 id="ecpg-sqlda-output">
- <title>Retreiving a result set using an SQLDA</title>
+ <title>Retreiving a Result Set Using an SQLDA</title>
<procedure>
<para>
@@ -4169,7 +4169,7 @@ switch (v.sqltype)
</sect3>
<sect3 id="ecpg-sqlda-input">
- <title>Passing query parameters using an SQLDA</title>
+ <title>Passing Query Parameters Using an SQLDA</title>
<procedure>
<para>
@@ -4255,7 +4255,7 @@ free(sqlda2);
</sect3>
<sect3 id="ecpg-sqlda-example">
- <title>A sample application using SQLDA</title>
+ <title>A Sample Application Using SQLDA</title>
<para>
Here is an example program, which describes how to fetch access
@@ -4426,7 +4426,7 @@ main(void)
</para>
<example id="ecpg-sqlda-example-example">
- <title>Example SQLDA program</title>
+ <title>Example SQLDA Program</title>
<programlisting>
#include &lt;stdlib.h>
#include &lt;string.h>
@@ -4633,7 +4633,7 @@ tup_deleted = 0 (type: 9)
</para>
<sect2 id="ecpg-whenever">
- <title>Setting callbacks</title>
+ <title>Setting Callbacks</title>
<para>
One simple method to catch errors and warnings is to set a
@@ -4954,7 +4954,7 @@ sqlstate: 42P01
</sect2>
<sect2 id="ecpg-sqlstate-sqlcode">
- <title><literal>SQLSTATE</literal> vs <literal>SQLCODE</literal></title>
+ <title><literal>SQLSTATE</literal> vs. <literal>SQLCODE</literal></title>
<para>
The fields <literal>sqlca.sqlstate</literal> and
@@ -5469,7 +5469,7 @@ while (1)
</sect1>
<sect1 id="ecpg-preproc">
- <title>Preprocessor directives</title>
+ <title>Preprocessor Directives</title>
<para>
Several preprocessor directives are available that modify how
@@ -5478,7 +5478,7 @@ while (1)
</para>
<sect2 id="ecpg-include">
- <title>Including files</title>
+ <title>Including Files</title>
<para>
To include an external file into your embedded SQL program, use:
@@ -5537,7 +5537,7 @@ EXEC SQL INCLUDE "<replaceable>filename</replaceable>";
</sect2>
<sect2 id="ecpg-define">
- <title>The define and undef directives</title>
+ <title>The define and undef Directives</title>
<para>
Similar to the directive <literal>#define</literal> that is known from C,
embedded SQL has a similar concept:
@@ -5580,7 +5580,7 @@ EXEC SQL UPDATE Tbl SET col = MYNUMBER;
</sect2>
<sect2 id="ecpg-ifdef">
- <title>ifdef, ifndef, else, elif, and endif directives</title>
+ <title>ifdef, ifndef, else, elif, and endif Directives</title>
<para>
You can use the following directives to compile code sections conditionally:
@@ -5842,7 +5842,7 @@ ECPG = ecpg
</para>
<example id="ecpg-lo-example">
- <title>ECPG program accessing large objects</title>
+ <title>ECPG Program Accessing Large Objects</title>
<programlisting><![CDATA[
#include <stdio.h>
#include <stdlib.h>
@@ -5960,7 +5960,7 @@ main(void)
</para>
<sect2 id="ecpg-cpp-scope">
- <title>Scope for host variables</title>
+ <title>Scope for Host Variables</title>
<para>
The <command>ecpg</command> preprocessor understands the scope of
@@ -6038,7 +6038,7 @@ void TestCpp::test()
</sect2>
<sect2 id="ecpg-cpp-and-c">
- <title>C++ application development with external C module</title>
+ <title>C++ Application Development with External C Module</title>
<para>
If you understand these technical limitations of
@@ -7873,7 +7873,7 @@ $COMMIT;
</para>
<sect2 id="ecpg-informix-types">
- <title>Additional types</title>
+ <title>Additional Types</title>
<para>
The Informix-special "string" pseudo-type for storing right-trimmed character string data is now
supported in Informix-mode without using <literal>typedef</literal>. In fact, in Informix-mode,
@@ -7889,7 +7889,7 @@ EXEC SQL FETCH MYCUR INTO :userid;
</sect2>
<sect2 id="ecpg-informix-statements">
- <title>Additional/missing embedded SQL statements</title>
+ <title>Additional/Missing Embedded SQL Statements</title>
<para>
<variablelist>
<varlistentry>
@@ -7931,7 +7931,7 @@ EXEC SQL CLOSE DATABASE;
</sect2>
<sect2 id="ecpg-informix-sqlda">
- <title>Informix-compatible SQLDA descriptor areas</title>
+ <title>Informix-Compatible SQLDA Descriptor Areas</title>
<para>
Informix-compatible mode supports a different structure than the one described in
<xref linkend="ecpg-sqlda-descriptors">. See below:
@@ -8208,7 +8208,7 @@ EXEC SQL INCLUDE sqlda.h;
</sect2>
<sect2 id="ecpg-informix-functions">
- <title>Additional functions</title>
+ <title>Additional Functions</title>
<para>
<variablelist>
<varlistentry>
@@ -9266,7 +9266,7 @@ risnull(CINTTYPE, (char *) &i);
</sect2>
<sect2 id="ecpg-informix-constants">
- <title>Additional constants</title>
+ <title>Additional Constants</title>
<para>
Note that all constants here describe errors and all of them are defined
to represent negative values. In the descriptions of the different