doc: add documentation about ecpg Oracle-compatibility mode
authorBruce Momjian
Thu, 14 Jul 2022 20:19:45 +0000 (16:19 -0400)
committerBruce Momjian
Thu, 14 Jul 2022 20:19:45 +0000 (16:19 -0400)
Reported-by: Takeshi Ideriha
Discussion: https://postgr.es/m/TYCPR01MB7041A157067208327D8DAAF9EAA59@TYCPR01MB7041.jpnprd01.prod.outlook.com

Backpatch-through: 11

doc/src/sgml/ecpg.sgml

index 7f8b4dd5c023b64f0f86b0689772ad7f4d9bf49a..999b7ca0ae81b30795e68d9d8e1a192aace51440 100644 (file)
@@ -1890,7 +1890,8 @@ EXEC SQL SELECT b INTO :val :val_ind FROM test1;
 
     The indicator variable val_ind will be zero if
     the value was not null, and it will be negative if the value was
-    null.
+    null.  (See  to enable
+    Oracle-specific behavior.)
    
 
    
@@ -9799,6 +9800,42 @@ risnull(CINTTYPE, (char *) &i);
   
  
 
+  <productname>Oracle</productname> Compatibility Mode
+  
+   ecpg can be run in a so-called Oracle
+   compatibility mode. If this mode is active, it tries to
+   behave as if it were Oracle Pro*C.
+  
+
+  
+   Specifically, this mode changes ecpg in three ways:
+
+   
+    
+     
+      Pad character arrays receiving character string types with
+      trailing spaces to the specified length
+     
+    
+
+    
+     
+      Zero byte terminate these character arrays, and set the indicator
+      variable if truncation occurs
+     
+    
+
+    
+     
+      Set the null indicator to -1 when character
+      arrays receive empty character string types
+     
+    
+   
+  
+
  
   Internals