File tree 1 file changed +10
-3
lines changed
src/interfaces/ecpg/preproc
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 1
- /* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.addons,v 1.10 2009/11/26 15:39:26 meskes Exp $ */
1
+ /* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.addons,v 1.11 2009/11/27 16:07:22 meskes Exp $ */
2
2
ECPG: stmtClosePortalStmt block
3
3
{
4
4
if (INFORMIX_MODE)
@@ -297,7 +297,7 @@ ECPG: DeclareCursorStmtDECLAREcursor_namecursor_optionsCURSORopt_holdFORSelectSt
297
297
{
298
298
struct cursor *ptr, *this;
299
299
char *cursor_marker = $2[0] == ':' ? make_str("$0") : mm_strdup($2);
300
- char *comment;
300
+ char *comment, *c1, *c2 ;
301
301
302
302
for (ptr = cur; ptr != NULL; ptr = ptr->next)
303
303
{
@@ -317,7 +317,14 @@ ECPG: DeclareCursorStmtDECLAREcursor_namecursor_optionsCURSORopt_holdFORSelectSt
317
317
argsinsert = argsresult = NULL;
318
318
cur = this;
319
319
320
- comment = cat_str(3, make_str("/*"), mm_strdup(this->command), make_str("*/"));
320
+ c1 = mm_strdup(this->command);
321
+ if ((c2 = strstr(c1, "*/")) != NULL)
322
+ {
323
+ /* We put this text into a comment, so we better remove [*][/]. */
324
+ c2[0] = '.';
325
+ c2[1] = '.';
326
+ }
327
+ comment = cat_str(3, make_str("/*"), c1, make_str("*/"));
321
328
322
329
if (INFORMIX_MODE)
323
330
{
You can’t perform that action at this time.
0 commit comments