aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/preproc/ecpg.trailer
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/preproc/ecpg.trailer')
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.trailer7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/preproc/ecpg.trailer b/src/interfaces/ecpg/preproc/ecpg.trailer
index 3b5d660fc41..6040a4b012d 100644
--- a/src/interfaces/ecpg/preproc/ecpg.trailer
+++ b/src/interfaces/ecpg/preproc/ecpg.trailer
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.trailer,v 1.10 2009/08/07 10:51:20 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.trailer,v 1.11 2009/08/14 13:28:22 meskes Exp $ */
statements: /*EMPTY*/
| statements statement
@@ -318,7 +318,10 @@ ECPGCursorStmt: DECLARE name cursor_options CURSOR opt_hold FOR prepared_name
cur = this;
- $$ = cat_str(3, make_str("/*"), mm_strdup(this->command), make_str("*/"));
+ if (INFORMIX_MODE && braces_open > 0) /* we're in a function */
+ $$ = cat_str(4, make_str("ECPG_informix_reset_sqlca();"), make_str("/*"), mm_strdup(this->command), make_str("*/"));
+ else
+ $$ = cat_str(3, make_str("/*"), mm_strdup(this->command), make_str("*/"));
}
;