Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Fixed ECPG to correctly handle out-of-scope cursor declarations with pointers
authorMichael Meskes <meskes@postgresql.org>
Mon, 11 Sep 2017 19:10:36 +0000 (21:10 +0200)
committerMichael Meskes <meskes@postgresql.org>
Mon, 18 Sep 2017 21:07:34 +0000 (23:07 +0200)
or array variables.

src/interfaces/ecpg/preproc/ecpg.header

index 2562366bbedbd6183f266738f664e729e5e3a443..a52da01b1f9941f833e6b78341d231db8a6c800f 100644 (file)
@@ -352,7 +352,7 @@ adjust_outofscope_cursor_vars(struct cursor *cur)
                else
                {
                    newvar = new_variable(cat_str(4, mm_strdup("("),
-                                                 mm_strdup(ecpg_type_name(ptr->variable->type->type)),
+                                                 mm_strdup(ecpg_type_name(ptr->variable->type->u.element->type)),
                                                  mm_strdup(" *)(ECPGget_var("),
                                                  mm_strdup(var_text)),
                                          ECPGmake_array_type(ECPGmake_simple_type(ptr->variable->type->u.element->type,