Skip to content

Commit 129e9dd

Browse files
author
Michael Meskes
committed
Fixed incorrect description of EXEC SQL VAR command.
Thanks to MauMau <maumau307@gmail.com> for finding and fixing this.
1 parent 921a0b2 commit 129e9dd

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

doc/src/sgml/ecpg.sgml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7682,9 +7682,9 @@ VAR <replaceable>varname</replaceable> IS <replaceable>ctype</replaceable>
76827682
<title>Description</title>
76837683

76847684
<para>
7685-
The <command>VAR</command> command defines a host variable. It
7686-
is equivalent to an ordinary C variable definition inside a
7687-
declare section.
7685+
The <command>VAR</command> command assigns a new C data type
7686+
to a host variable. The host variable must be previously
7687+
declared in a declare section.
76887688
</para>
76897689
</refsect1>
76907690

@@ -7716,8 +7716,10 @@ VAR <replaceable>varname</replaceable> IS <replaceable>ctype</replaceable>
77167716
<title>Examples</title>
77177717

77187718
<programlisting>
7719-
EXEC SQL VAR vc IS VARCHAR[10];
7720-
EXEC SQL VAR boolvar IS bool;
7719+
Exec sql begin declare section;
7720+
short a;
7721+
exec sql end declare section;
7722+
EXEC SQL VAR a IS int;
77217723
</programlisting>
77227724
</refsect1>
77237725

0 commit comments

Comments
 (0)