Lists: | pgsql-hackers |
---|
From: | "MauMau" <maumau307(at)gmail(dot)com> |
---|---|
To: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | [9.3 doc fix] ECPG VAR command does not describe the actual specification |
Date: | 2013-06-27 11:53:24 |
Message-ID: | 7B77843070A64FA281BC9E8F07C0B92A@maumau |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hello,
Looking around the 9.3 doc, I found a small, but not-insignificant error in
the documentation.
http://www.postgresql.org/docs/9.3/static/ecpg-sql-var.html
According to the description,
EXEC SQL VAR a IS int;
is equivalent to:
Exec sql begin declare section;
int a;
exec sql end declare section;
However, "ecpg var.pgc" produces the error:
var.pgc:1: ERROR: variable "a" is not declared
On the other hand, the following code can be preprocessed correctly,
treating the host variable "a" as an int type.
--------------------------------------------------
Exec sql begin declare section;
short a;
exec sql end declare section;
EXEC SQL VAR a IS int;
EXEC SQL SELECT c INTO :a FROM mytable;
--------------------------------------------------
The attached patch fixes this documentation error. This is not specific to
9.3, so it needs to be backported. Could you commit this?
Regards
MauMau
Attachment | Content-Type | Size |
---|---|---|
ecpg_var_doc.patch | application/octet-stream | 1.2 KB |
From: | Michael Meskes <meskes(at)postgresql(dot)org> |
---|---|
To: | MauMau <maumau307(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [9.3 doc fix] ECPG VAR command does not describe the actual specification |
Date: | 2013-06-27 15:07:47 |
Message-ID: | 20130627150747.GA24842@feivel.credativ.lan |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
> Looking around the 9.3 doc, I found a small, but not-insignificant
> error in the documentation.
Thanks for finding and fixing. Patch committed.
Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
Jabber: michael.meskes at gmail dot com
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL