[9.3 doc fix] ECPG VAR command does not describe the actual specification

Поиск
Список
Период
Сортировка
От MauMau
Тема [9.3 doc fix] ECPG VAR command does not describe the actual specification
Дата
Msg-id 7B77843070A64FA281BC9E8F07C0B92A@maumau
обсуждение исходный текст
Ответы Re: [9.3 doc fix] ECPG VAR command does not describe the actual specification  (Michael Meskes <meskes@postgresql.org>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: in-catalog Extension Scripts and Control parameters (templates?)
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Min value for port