(<symbol>ECPG_TRANS</symbol>)</term>
<listitem>
<para>
The <productname>PostgreSQL</productname> server signaled that
we cannot start, commit, or rollback the transaction.
(SQLSTATE 08007)
</para>
</listitem>
</varlistentry>
<varlistentry id="ecpg-sqlstate-sqlcode-ecpg-connect">
<term>-402 (<symbol>ECPG_CONNECT</symbol>)</term>
<listitem>
<para>
The connection attempt to the database did not succeed.
(SQLSTATE 08001)
</para>
</listitem>
</varlistentry>
<varlistentry id="ecpg-sqlstate-sqlcode-ecpg-duplicate-key">
<term>-403 (<symbol>ECPG_DUPLICATE_KEY</symbol>)</term>
<listitem>
<para>
Duplicate key error, violation of unique constraint. (SQLSTATE
23505)
</para>
</listitem>
</varlistentry>
<varlistentry id="ecpg-sqlstate-sqlcode-ecpg-subselect-not-one">
<term>-404 (<symbol>ECPG_SUBSELECT_NOT_ONE</symbol>)</term>
<listitem>
<para>
A result for the subquery is not single row. (SQLSTATE 21000)
</para>
</listitem>
</varlistentry>
<!-- currently not used by the code -->
<!--
<varlistentry id="ecpg-sqlstate-sqlcode-ecpg-warning-unrecognized">
<term>-600 (<symbol>ECPG_WARNING_UNRECOGNIZED</symbol>)</term>
<listitem>
<para>
An unrecognized warning was received from the server.
</para>
</listitem>
</varlistentry>
<varlistentry id="ecpg-sqlstate-sqlcode-ecpg-warning-query-ignored">
<term>-601 (<symbol>ECPG_WARNING_QUERY_IGNORED</symbol>)</term>
<listitem>
<para>
Current transaction is aborted. Queries are ignored until the
end of the transaction block.
</para>
</listitem>
</varlistentry>
-->
<varlistentry id="ecpg-sqlstate-sqlcode-ecpg-warning-unknown-portal">
<term>-602 (<symbol>ECPG_WARNING_UNKNOWN_PORTAL</symbol>)</term>
<listitem>
<para>
An invalid cursor name was specified. (SQLSTATE 34000)
</para>
</listitem>
</varlistentry>
<varlistentry id="ecpg-sqlstate-sqlcode-ecpg-warning-in-transaction">
<term>-603 (<symbol>ECPG_WARNING_IN_TRANSACTION</symbol>)</term>
<listitem>
<para>
Transaction is in progress. (SQLSTATE 25001)
</para>
</listitem>
</varlistentry>
<varlistentry id="ecpg-sqlstate-sqlcode-ecpg-warning-no-transaction">
<term>-604 (<symbol>ECPG_WARNING_NO_TRANSACTION</symbol>)</term>
<listitem>
<para>
There is no active (in-progress) transaction. (SQLSTATE 25P01)
</para>
</listitem>
</varlistentry>
<varlistentry id="ecpg-sqlstate-sqlcode-ecpg-warning-portal-exists">
<term>-605 (<symbol>ECPG_WARNING_PORTAL_EXISTS</symbol>)</term>
<listitem>
<para>
An existing cursor name was specified. (SQLSTATE 42P03)
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</sect2>
</sect1>
<sect1 id="ecpg-preproc">
<title>Preprocessor Directives</title>
<para>
Several preprocessor directives are available that modify how
the <command>ecpg</command> preprocessor parses and processes a
file.
</para>
<sect2 id="ecpg-include">
<title>Including Files</title>
<para>
To include an external file into your embedded SQL program, use:
<programlisting>
EXEC SQL INCLUDE <replaceable>filename</replaceable>;
EXEC SQL INCLUDE <<replaceable>filename</replaceable>>;
EXEC SQL INCLUDE "<replaceable>filename</replaceable>";
</programlisting>
The embedded SQL preprocessor will look for a file named
<literal><replaceable>filename</replaceable>.h</literal>,
preprocess it, and include it in the resulting C output. Thus,
embedded SQL statements in the included file are handled correctly.
</para>
<para>
The <command>ecpg</command> preprocessor will search a file at
several directories in following order:
<itemizedlist>
<listitem><simpara>current