Skip to content

Commit 613e5a3

Browse files
committed
doc: add documentation about ecpg Oracle-compatibility mode
Reported-by: Takeshi Ideriha Discussion: https://postgr.es/m/TYCPR01MB7041A157067208327D8DAAF9EAA59@TYCPR01MB7041.jpnprd01.prod.outlook.com Backpatch-through: 11
1 parent d73ea61 commit 613e5a3

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

doc/src/sgml/ecpg.sgml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1822,7 +1822,8 @@ EXEC SQL SELECT b INTO :val :val_ind FROM test1;
18221822
</programlisting>
18231823
The indicator variable <varname>val_ind</varname> will be zero if
18241824
the value was not null, and it will be negative if the value was
1825-
null.
1825+
null. (See <xref linkend="ecpg-oracle-compat"/> to enable
1826+
Oracle-specific behavior.)
18261827
</para>
18271828

18281829
<para>
@@ -9568,6 +9569,42 @@ risnull(CINTTYPE, (char *) &i);
95689569
</sect2>
95699570
</sect1>
95709571

9572+
<sect1 id="ecpg-oracle-compat">
9573+
<title><productname>Oracle</productname> Compatibility Mode</title>
9574+
<para>
9575+
<command>ecpg</command> can be run in a so-called <firstterm>Oracle
9576+
compatibility mode</firstterm>. If this mode is active, it tries to
9577+
behave as if it were Oracle <productname>Pro*C</productname>.
9578+
</para>
9579+
9580+
<para>
9581+
Specifically, this mode changes <command>ecpg</command> in three ways:
9582+
9583+
<itemizedlist>
9584+
<listitem>
9585+
<para>
9586+
Pad character arrays receiving character string types with
9587+
trailing spaces to the specified length
9588+
</para>
9589+
</listitem>
9590+
9591+
<listitem>
9592+
<para>
9593+
Zero byte terminate these character arrays, and set the indicator
9594+
variable if truncation occurs
9595+
</para>
9596+
</listitem>
9597+
9598+
<listitem>
9599+
<para>
9600+
Set the null indicator to <literal>-1</literal> when character
9601+
arrays receive empty character string types
9602+
</para>
9603+
</listitem>
9604+
</itemizedlist>
9605+
</para>
9606+
</sect1>
9607+
95719608
<sect1 id="ecpg-develop">
95729609
<title>Internals</title>
95739610

0 commit comments

Comments
 (0)