Fixed incorrect description of EXEC SQL VAR command.
authorMichael Meskes
Thu, 27 Jun 2013 14:00:32 +0000 (16:00 +0200)
committerMichael Meskes
Thu, 27 Jun 2013 15:07:03 +0000 (17:07 +0200)
Thanks to MauMau  for finding and fixing this.

doc/src/sgml/ecpg.sgml

index 68bcb13ca0424e550a5acb190140fc25018f1397..c629726affe6a642c8fde26e9a2ca0920af479be 100644 (file)
@@ -7691,9 +7691,9 @@ VAR varname IS ctype
     Description
 
     
-     The VAR command defines a host variable.  It
-     is equivalent to an ordinary C variable definition inside a
-     declare section.
+     The VAR command assigns a new C data type
+     to a host variable.  The host variable must be previously
+     declared in a declare section.
     
    
 
@@ -7725,8 +7725,10 @@ VAR varname IS ctype
     Examples
 
 
-EXEC SQL VAR vc IS VARCHAR[10];
-EXEC SQL VAR boolvar IS bool;
+Exec sql begin declare section;
+short a;
+exec sql end declare section;
+EXEC SQL VAR a IS int;