Skip to content

Commit bf3d692

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 85e3287 commit bf3d692

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>
@@ -9586,6 +9587,42 @@ risnull(CINTTYPE, (char *) &i);
95869587
</sect2>
95879588
</sect1>
95889589

9590+
<sect1 id="ecpg-oracle-compat">
9591+
<title><productname>Oracle</productname> Compatibility Mode</title>
9592+
<para>
9593+
<command>ecpg</command> can be run in a so-called <firstterm>Oracle
9594+
compatibility mode</firstterm>. If this mode is active, it tries to
9595+
behave as if it were Oracle <productname>Pro*C</productname>.
9596+
</para>
9597+
9598+
<para>
9599+
Specifically, this mode changes <command>ecpg</command> in three ways:
9600+
9601+
<itemizedlist>
9602+
<listitem>
9603+
<para>
9604+
Pad character arrays receiving character string types with
9605+
trailing spaces to the specified length
9606+
</para>
9607+
</listitem>
9608+
9609+
<listitem>
9610+
<para>
9611+
Zero byte terminate these character arrays, and set the indicator
9612+
variable if truncation occurs
9613+
</para>
9614+
</listitem>
9615+
9616+
<listitem>
9617+
<para>
9618+
Set the null indicator to <literal>-1</literal> when character
9619+
arrays receive empty character string types
9620+
</para>
9621+
</listitem>
9622+
</itemizedlist>
9623+
</para>
9624+
</sect1>
9625+
95899626
<sect1 id="ecpg-develop">
95909627
<title>Internals</title>
95919628

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy