From: Michael Meskes Date: Mon, 11 Sep 2017 19:10:36 +0000 (+0200) Subject: Fixed ECPG to correctly handle out-of-scope cursor declarations with pointers X-Git-Tag: REL9_6_6~60 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59b5a3e5c72e4b91876df226eab09dc97c6e190e;p=postgresql Fixed ECPG to correctly handle out-of-scope cursor declarations with pointers or array variables. --- diff --git a/src/interfaces/ecpg/preproc/ecpg.header b/src/interfaces/ecpg/preproc/ecpg.header index 2562366bbe..a52da01b1f 100644 --- a/src/interfaces/ecpg/preproc/ecpg.header +++ b/src/interfaces/ecpg/preproc/ecpg.header @@ -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,