summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2013-06-27 16:00:32 +0200
committerMichael Meskes <meskes@postgresql.org>2013-06-27 17:07:03 +0200
commita2769a4e2137bda5f3ad2834fbb5f353f86cab40 (patch)
tree832d4d86c9368f7b7fa1aa9546cb49d669f1988c
parent682d977f816e7fa7f29c723666248a8c3ac09bd6 (diff)
Fixed incorrect description of EXEC SQL VAR command.
Thanks to MauMau <maumau307@gmail.com> for finding and fixing this.
-rw-r--r--doc/src/sgml/ecpg.sgml12
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index 68bcb13ca04..c629726affe 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -7691,9 +7691,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>
@@ -7725,8 +7725,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>