aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2013-06-27 16:00:32 +0200
committerMichael Meskes <meskes@postgresql.org>2013-07-12 15:03:40 +0200
commit129e9dd1a2527a5a69d9761f11991a1857bcd91d (patch)
treeff901a32bec2d5bd6de1e84492d05bb664addda0
parent921a0b20138c73a3de3067c89cf7424b3d22c1ef (diff)
downloadpostgresql-129e9dd1a2527a5a69d9761f11991a1857bcd91d.tar.gz
postgresql-129e9dd1a2527a5a69d9761f11991a1857bcd91d.zip
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 4d904cdeb88..fc9ba0c0186 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -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>