Skip to content

Commit 8e97474

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 8f253ba commit 8e97474

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
@@ -1890,7 +1890,8 @@ EXEC SQL SELECT b INTO :val :val_ind FROM test1;
18901890
</programlisting>
18911891
The indicator variable <varname>val_ind</varname> will be zero if
18921892
the value was not null, and it will be negative if the value was
1893-
null.
1893+
null. (See <xref linkend="ecpg-oracle-compat"/> to enable
1894+
Oracle-specific behavior.)
18941895
</para>
18951896

18961897
<para>
@@ -9801,6 +9802,42 @@ risnull(CINTTYPE, (char *) &i);
98019802
</sect2>
98029803
</sect1>
98039804

9805+
<sect1 id="ecpg-oracle-compat">
9806+
<title><productname>Oracle</productname> Compatibility Mode</title>
9807+
<para>
9808+
<command>ecpg</command> can be run in a so-called <firstterm>Oracle
9809+
compatibility mode</firstterm>. If this mode is active, it tries to
9810+
behave as if it were Oracle <productname>Pro*C</productname>.
9811+
</para>
9812+
9813+
<para>
9814+
Specifically, this mode changes <command>ecpg</command> in three ways:
9815+
9816+
<itemizedlist>
9817+
<listitem>
9818+
<para>
9819+
Pad character arrays receiving character string types with
9820+
trailing spaces to the specified length
9821+
</para>
9822+
</listitem>
9823+
9824+
<listitem>
9825+
<para>
9826+
Zero byte terminate these character arrays, and set the indicator
9827+
variable if truncation occurs
9828+
</para>
9829+
</listitem>
9830+
9831+
<listitem>
9832+
<para>
9833+
Set the null indicator to <literal>-1</literal> when character
9834+
arrays receive empty character string types
9835+
</para>
9836+
</listitem>
9837+
</itemizedlist>
9838+
</para>
9839+
</sect1>
9840+
98049841
<sect1 id="ecpg-develop">
98059842
<title>Internals</title>
98069843

0 commit comments

Comments
 (0)