ecpg: the comments inside the declare section are not outputted correctly.

Поиск
Список
Период
Сортировка
От Ashutosh Sharma
Тема ecpg: the comments inside the declare section are not outputted correctly.
Дата
Msg-id CAE9k0Pm-N4eFidk9Mg_ZhdLzGhPRth4K+Zgaigo44EsLX276Jg@mail.gmail.com
обсуждение исходный текст
Список pgsql-interfaces
Hi All,

While working on some other issue, I noticed that the comments inside the declare section are not outputted correctly. Have a look at the below example and its output.

void main(void)
{
exec sql begin declare section;
    int v1 = 100;
/* First Layer */
#ifdef MACRO1
/* Second Layer */
#ifdef MACRO2
   int testVar = 2;
#endif
#endif
exec sql end declare section;

    return 1;
}

Output:

void main(void)
{
/* exec sql begin declare section */

/* First Layer *//* Second Layer */
#line 4 "test.pgc"
 int v1 = 100 ;

#ifdef MACRO1

#ifdef MACRO2

#line 9 "test.pgc"
 int testVar = 2 ;

#endif
 #endif
/* exec sql end declare section */
#line 12 "test.pgc"


    return 1;
}

If you see the output, the comments present inside the input file got shifted to the wrong place in the output file. This doesn't happen if such comments are present outside the declare section.

I know this is not a severe issue but certainly something that would be nice correcting.

Thanks,

--
With Regards,
Ashutosh Sharma
EnterpriseDB:http://www.enterprisedb.com

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ecpg: issue related to preprocessor directives
Следующее
От: Ashutosh Sharma
Дата:
Сообщение: #include present twice in define.pgc