]> granicus.if.org Git - postgresql/commitdiff
Fixed incorrect description of EXEC SQL VAR command.
authorMichael Meskes <meskes@postgresql.org>
Thu, 27 Jun 2013 14:00:32 +0000 (16:00 +0200)
committerMichael Meskes <meskes@postgresql.org>
Fri, 12 Jul 2013 13:03:40 +0000 (15:03 +0200)
Thanks to MauMau <maumau307@gmail.com> for finding and fixing this.

doc/src/sgml/ecpg.sgml

index 4d904cdeb8815cbbcdf0c0fd84ade6de8c9830ae..fc9ba0c0186729787355c0ebd106462d3d2e6650 100644 (file)
@@ -7682,9 +7682,9 @@ VAR <replaceable>varname</replaceable> IS <replaceable>ctype</replaceable>
     <title>Description</title>
 
     <para>
-     The <command>VAR</command> command defines a host variable.  It
-     is equivalent to an ordinary C variable definition inside a
-     declare section.
+     The <command>VAR</command> command assigns a new C data type
+     to a host variable.  The host variable must be previously
+     declared in a declare section.
     </para>
    </refsect1>
 
@@ -7716,8 +7716,10 @@ VAR <replaceable>varname</replaceable> IS <replaceable>ctype</replaceable>
     <title>Examples</title>
 
 <programlisting>
-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;
 </programlisting>
    </refsect1>