8000 doc: add documentation about ecpg Oracle-compatibility mode · postgres/postgres@846ae36 · GitHub
[go: up one dir, main page]

Skip to content

Commit 846ae36

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 264f75b commit 846ae36

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
@@ -1792,7 +1792,8 @@ EXEC SQL SELECT b INTO :val :val_ind FROM test1;
17921792
</programlisting>
17931793
The indicator variable <varname>val_ind</varname> will be zero if
17941794
the value was not null, and it will be negative if the value was
1795-
null.
1795+
null. (See <xref linkend="ecpg-oracle-compat"/> to enable
1796+
Oracle-specific behavior.)
17961797
</para>
17971798

17981799
<para>
@@ -9538,6 +9539,42 @@ risnull(CINTTYPE, (char *) &i);
95389539
</sect2>
95399540
</sect1>
95409541

9542+
<sect1 id="ecpg-oracle-compat">
9543+
<title><productname>Oracle</productname> Compatibility Mode</title>
9544+
<para>
9545+
<command>ecpg</command> can be run in a so-called <firstterm>Oracle
9546+
compatibility mode</firstterm>. If this mode is active, it tries to
9547+
behave as if it were Oracle <productname>Pro*C</productname>.
9548+
</para>
9549+
9550+
<para>
9551+
Specifically, this mode changes <command>ecpg</command> in three ways:
9552+
9553+
<itemizedlist>
9554+
<listitem>
9555+
<para>
9556+
Pad character arrays receiving character string types with
9557+
trailing spaces to the specified length
9558+
</para>
9559+
</listitem>
9560+
9561+
<listitem>
9562+
<para>
9563+
Zero byte terminate these character arrays, and set the indicator
9564+
variable if truncation occurs
9565+
</para>
9566+
</listitem>
9567+
9568+
<listitem>
9569+
<para>
9570+
Set the null indicator to <literal>-1</literal> when character
9571+
arrays receive empty character string types
9572+
</para>
9573+
</listitem>
9574+
</itemizedlist>
9575+
</para>
9576+
</sect1>
9577+
95419578
<sect1 id="ecpg-develop">
95429579
<title>Internals</title>
95439580

0 commit comments

Comments
 (0)
0