Home Explore Blog CI



postgresql

2nd chunk of `doc/src/sgml/ref/ecpg-ref.sgml`
62722a9288ae81745230d4054d2565f929b0b4784d73483c0000000100000ac0
 defined with the value <literal>1</literal>.
      </para>
     </listitem>
    </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>
       Parse system include files as well.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-I <replaceable class="parameter">directory</replaceable></option></term>
     <listitem>
      <para>
       Specify an additional include path, used to find files included
       via <literal>EXEC SQL INCLUDE</literal>.  Defaults are
       <filename>.</filename> (current directory),
       <filename>/usr/local/include</filename>, the
       <productname>PostgreSQL</productname> include directory which
       is defined at compile time (default:
       <filename>/usr/local/pgsql/include</filename>), and
       <filename>/usr/include</filename>, in that order.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-o <replaceable>filename</replaceable></option></term>
     <listitem>
      <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>

    <varlistentry>
     <term><option>-r <replaceable>option</replaceable></option></term>
     <listitem>
      <para>
       Selects run-time behavior.  <replaceable>Option</replaceable> can be
       one of the following:
       <variablelist>
        <varlistentry>
         <term><option>no_indicator</option></term>
         <listitem>
         <para>
         Do not use indicators but instead use special values to represent
         null values. Historically there have been databases using this approach.
         </para>
         </listitem>
        </varlistentry>
        <varlistentry>
         <term><option>prepare</option></term>
         <listitem>
         <para>
         Prepare all statements before using them. Libecpg will keep a cache of
         prepared statements and reuse a statement if it gets executed again. If the
         cache runs full, libecpg will free the least used statement.
         </para>
         </listitem>
        </varlistentry>

Title: ecpg Options (Continued)
Summary
This section details additional command-line options for `ecpg`. It includes options for specifying include paths (`-I`), output filenames (`-o`), and runtime behavior (`-r`). The `-r` option can configure indicator usage (`no_indicator`) and statement preparation (`prepare`) for runtime optimization.