Skip to content

Commit 76fa4bf

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 64d364b commit 76fa4bf

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
@@ -1927,7 +1927,8 @@ EXEC SQL SELECT b INTO :val :val_ind FROM test1;
19271927
</programlisting>
19281928
The indicator variable <varname>val_ind</varname> will be zero if
19291929
the value was not null, and it will be negative if the value was
1930-
null.
1930+
null. (See <xref linkend="ecpg-oracle-compat"/> to enable
1931+
Oracle-specific behavior.)
19311932
</para>
19321933

19331934
<para>
@@ -9836,6 +9837,42 @@ risnull(CINTTYPE, (char *) &i);
98369837
</sect2>
98379838
</sect1>
98389839

9840+
<sect1 id="ecpg-oracle-compat">
9841+
<title><productname>Oracle</productname> Compatibility Mode</title>
9842+
<para>
9843+
<command>ecpg</command> can be run in a so-called <firstterm>Oracle
9844+
compatibility mode</firstterm>. If this mode is active, it tries to
9845+
behave as if it were Oracle <productname>Pro*C</productname>.
9846+
</para>
9847+
9848+
<para>
9849+
Specifically, this mode changes <command>ecpg</command> in three ways:
9850+
9851+
<itemizedlist>
9852+
<listitem>
9853+
<para>
9854+
Pad character arrays receiving character string types with
9855+
trailing spaces to the specified length
9856+
</para>
9857+
</listitem>
9858+
9859+
<listitem>
9860+
<para>
9861+
Zero byte terminate these character arrays, and set the indicator
9862+
variable if truncation occurs
9863+
</para>
9864+
</listitem>
9865+
9866+
<listitem>
9867+
<para>
9868+
Set the null indicator to <literal>-1</literal> when character
9869+
arrays receive empty character string types
9870+
</para>
9871+
</listitem>
9872+
</itemizedlist>
9873+
</para>
9874+
</sect1>
9875+
98399876
<sect1 id="ecpg-develop">
98409877
<title>Internals</title>
98419878

0 commit comments

Comments
 (0)