aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ecpg.sgml8
-rw-r--r--doc/src/sgml/ref/ecpg-ref.sgml6
2 files changed, 12 insertions, 2 deletions
diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index b332aa435df..e7a53f3c9d0 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -5793,6 +5793,14 @@ EXEC SQL UPDATE Tbl SET col = MYNUMBER;
embedded SQL query because in this case the embedded SQL precompiler is not
able to see this declaration.
</para>
+
+ <para>
+ If multiple input files are named on the <command>ecpg</command>
+ preprocessor's command line, the effects of <literal>EXEC SQL
+ DEFINE</literal> and <literal>EXEC SQL UNDEF</literal> do not carry
+ across files: each file starts with only the symbols defined
+ by <option>-D</option> switches on the command line.
+ </para>
</sect2>
<sect2 id="ecpg-ifdef">
diff --git a/doc/src/sgml/ref/ecpg-ref.sgml b/doc/src/sgml/ref/ecpg-ref.sgml
index f3b6034f42a..43f2d8bdaa7 100644
--- a/doc/src/sgml/ref/ecpg-ref.sgml
+++ b/doc/src/sgml/ref/ecpg-ref.sgml
@@ -93,10 +93,12 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
- <term><option>-D <replaceable>symbol</replaceable></option></term>
+ <term><option>-D <replaceable>symbol</replaceable>[=<replaceable>value</replaceable>]</option></term>
<listitem>
<para>
- Define a C preprocessor symbol.
+ Define a preprocessor symbol, equivalently to the <command>EXEC SQL
+ DEFINE</command> directive. If no <replaceable>value</replaceable> is
+ specified, the symbol is defined with the value <literal>1</literal>.
</para>
</listitem>
</varlistentry>