Re: [WIP] RE: [HACKERS] DECLARE STATEMENT setting up a connection in ECPG

Поиск
Список
Период
Сортировка
От Haribabu Kommi
Тема Re: [WIP] RE: [HACKERS] DECLARE STATEMENT setting up a connection in ECPG
Дата
Msg-id CAJrrPGdcj+DgiRCuDjaCHdQ3eps540wAvcnx3kTLOpRtydbLLA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [WIP] RE: [HACKERS] DECLARE STATEMENT setting up a connectionin ECPG  ("Ideriha, Takeshi" <ideriha.takeshi@jp.fujitsu.com>)
Ответы Re: [WIP] RE: [HACKERS] DECLARE STATEMENT setting up a connection in ECPG
Re: [WIP] RE: [HACKERS] DECLARE STATEMENT setting up a connectionin ECPG
Список pgsql-hackers


On Tue, Mar 7, 2017 at 4:09 PM, Ideriha, Takeshi <ideriha.takeshi@jp.fujitsu.com> wrote:

Attached 004_declareStmt_test_v5.patch is a rebased one.
The rest of patches are same as older version.

Thanks for the update patch. I started reviewing the patches.

There was a minor conflict in applying 004_declareXX patch.

Some comments in 001_declareStmt_preproc_v5.patch:

+ if (INFORMIX_MODE)
+ {
+ if (pg_strcasecmp(stmt+strlen("close "), "database") == 0)
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in CLOSE DATABASE statement");
+
+ fprintf(base_yyout, "{ ECPGdisconnect(__LINE__, \"CURRENT\");");
+ whenever_action(2);
+ free(stmt);
+ break;
+ }
+ }

The same code block is present in the stmtClosePortalStmt condition to verify the close
statement. Because of the above code addition, the code present in stmtClosePortalStmt
is a dead code. So remove the code present in stmtClosePortalStmt or try to reuse it.


+static void
+output_cursor_name(char *str)

This function needs some comments to explain the code flow for better understanding.

+/*
+ * Translate the EXEC SQL DECLARE STATEMENT into ECPGdeclare function
+ */

How about using Transform instead of Translate? (similar references also)


I am yet to review the other patches.

Regards,
Hari Babu
Fujitsu Australia

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Questionable tag usage
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Unacccented Fractions