aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/ecpg-ref.sgml31
1 files changed, 26 insertions, 5 deletions
diff --git a/doc/src/sgml/ref/ecpg-ref.sgml b/doc/src/sgml/ref/ecpg-ref.sgml
index df3c1054f0f..f3b6034f42a 100644
--- a/doc/src/sgml/ref/ecpg-ref.sgml
+++ b/doc/src/sgml/ref/ecpg-ref.sgml
@@ -41,15 +41,22 @@ PostgreSQL documentation
<para>
<command>ecpg</command> will convert each input file given on the
- command line to the corresponding C output file. Input files
- preferably have the extension <filename>.pgc</filename>.
- The extension will be replaced by <filename>.c</filename> to
- determine the output file name.
- The output file name can also be overridden using the
+ command line to the corresponding C output file. If an input file
+ name does not have any extension, <filename>.pgc</filename> is
+ assumed. The file's extension will be replaced
+ by <filename>.c</filename> to construct the output file name.
+ But the output file name can be overridden using the
<option>-o</option> option.
</para>
<para>
+ If an input file name is just <literal>-</literal>,
+ <command>ecpg</command> reads the program from standard input
+ (and writes to standard output, unless that is overridden
+ with <option>-o</option>).
+ </para>
+
+ <para>
This reference page does not describe the embedded SQL language.
See <xref linkend="ecpg"/> for more information on that topic.
</para>
@@ -95,6 +102,19 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>-h</option></term>
+ <listitem>
+ <para>
+ Process header files. When this option is specified, the output file
+ extension becomes <literal>.h</literal> not <literal>.c</literal>,
+ and the default input file extension is <literal>.pgh</literal>
+ not <literal>.pgc</literal>. Also, the <option>-c</option> option is
+ forced on.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-i</option></term>
<listitem>
<para>
@@ -125,6 +145,7 @@ PostgreSQL documentation
<para>
Specifies that <command>ecpg</command> should write all
its output to the given <replaceable>filename</replaceable>.
+ Write <literal>-o -</literal> to send all output to standard output.
</para>
</listitem>
</varlistentry>